platform_system_core/libziparchive
Nick Desaulniers 4e7507ffc2 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>
2019-11-13 13:04:22 -08:00
..
include/ziparchive zipinfo: support DOS attributes. 2019-10-29 07:55:16 -07:00
testdata Check filename memory bound when parsing ziparchive 2017-06-30 17:19:28 +09:00
.clang-format add a performance benchmark for libziparchive 2017-05-30 10:50:14 -07:00
Android.bp ziparchive: add a corpus for the fuzzer. 2019-11-07 14:24:04 -08:00
entry_name_utils-inl.h Ziparchive: Enable -Wconversion 2019-04-05 13:50:48 -07:00
entry_name_utils_test.cc Ran clang-format on libziparchive sources and headers 2017-07-02 11:46:53 +09:00
libziparchive_fuzzer.cpp libziparchive: add trivial fuzzer. 2019-10-22 11:45:49 -07:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
unzip.cpp libziparchive: fix -Wimplicit-int-float-conversion 2019-11-13 13:04:22 -08:00
zip_archive.cc zipinfo: support DOS attributes. 2019-10-29 07:55:16 -07:00
zip_archive_benchmark.cpp [zip] Save 1 malloc and memset for each added file in ZipWriter 2019-06-18 21:49:16 -07:00
zip_archive_common.h Ran clang-format on libziparchive sources and headers 2017-07-02 11:46:53 +09:00
zip_archive_private.h libziparchive: add trivial fuzzer. 2019-10-22 11:45:49 -07:00
zip_archive_stream_entry.cc Ziparchive: Enable -Wconversion 2019-04-05 13:50:48 -07:00
zip_archive_test.cc ziparchive: add a std::string_view overload to Next. 2019-06-12 12:12:47 -07:00
zip_writer.cc Avoid using data descriptors in ZIP files when possible. 2019-07-23 06:58:53 +00:00
zip_writer_test.cc Avoid using data descriptors in ZIP files when possible. 2019-07-23 06:58:53 +00:00