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>
diff --git a/libziparchive/unzip.cpp b/libziparchive/unzip.cpp
index 81f8c0f..56f594a 100644
--- a/libziparchive/unzip.cpp
+++ b/libziparchive/unzip.cpp
@@ -111,7 +111,8 @@
 
 static float CompressionRatio(int64_t uncompressed, int64_t compressed) {
   if (uncompressed == 0) return 0;
-  return static_cast<float>(100LL * (uncompressed - compressed)) / uncompressed;
+  return static_cast<float>(100LL * (uncompressed - compressed)) /
+         static_cast<float>(uncompressed);
 }
 
 static void MaybeShowHeader(ZipArchiveHandle zah) {