diff options
| author | Nick Desaulniers <ndesaulniers@google.com> | 2019-11-13 13:01:48 -0800 |
|---|---|---|
| committer | Nick Desaulniers <ndesaulniers@google.com> | 2019-11-13 13:04:22 -0800 |
| commit | 4e7507ffc2739b5ca70d5ac659a2f7b12a803618 (patch) | |
| tree | 1c89c5ce73991dfd914446fc2be4ffab8e448b60 /libunwindstack/tests/MemoryFileTest.cpp | |
| parent | e91c76b2104792d839b2bd3036e7e265427dcdc1 (diff) | |
libziparchive: fix -Wimplicit-int-float-conversion
The value of uncompressed may not be precisely representable when
implicitly casted to an IEEE 754 single precision float.
Assuming the code doesn't need a precise compression ratio, accept the
potential imprecision via explicit cast.
system/core/libziparchive/unzip.cpp:114:68: error: implicit conversion
from 'int64_t' (aka 'long') to 'float' may lose precision
[-Werror,-Wimplicit-int-float-conversion]
return static_cast<float>(100LL * (uncompressed - compressed)) / uncompressed;
~ ^~~~~~~~~~~~
Change-Id: If46cfa4eb2bb16a7491e52bb5d1c212ed5d59079
Bug: 139945549
Test: lunch hikey960-userdebug && mm
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'libunwindstack/tests/MemoryFileTest.cpp')
0 files changed, 0 insertions, 0 deletions
