diff options
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 2 | ||||
-rw-r--r-- | cmds/idmap/create.cpp | 2 | ||||
-rw-r--r-- | cmds/idmap/scan.cpp | 13 |
3 files changed, 9 insertions, 8 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 21dc1e2..fba462b 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -530,7 +530,7 @@ bool BootAnimation::movie() if (leaf.size() > 0) { for (size_t j=0 ; j<pcount ; j++) { if (path == animation.parts[j].path) { - int method; + uint16_t method; // supports only stored png files if (mZip->getEntryInfo(entry, &method, NULL, NULL, NULL, NULL, NULL)) { if (method == ZipFileRO::kCompressStored) { diff --git a/cmds/idmap/create.cpp b/cmds/idmap/create.cpp index 16532b8..41395f1 100644 --- a/cmds/idmap/create.cpp +++ b/cmds/idmap/create.cpp @@ -23,7 +23,7 @@ namespace { if (entry == NULL) { return -1; } - if (!zip->getEntryInfo(entry, NULL, NULL, NULL, NULL, NULL, reinterpret_cast<long*>(crc))) { + if (!zip->getEntryInfo(entry, NULL, NULL, NULL, NULL, NULL, crc)) { return -1; } zip->releaseEntry(entry); diff --git a/cmds/idmap/scan.cpp b/cmds/idmap/scan.cpp index 84158d3..612a7eb 100644 --- a/cmds/idmap/scan.cpp +++ b/cmds/idmap/scan.cpp @@ -1,4 +1,5 @@ #include <dirent.h> +#include <inttypes.h> #include <sys/stat.h> #include "idmap.h" @@ -130,14 +131,14 @@ namespace { ALOGW("%s: failed to find entry AndroidManifest.xml\n", __FUNCTION__); return -1; } - size_t uncompLen = 0; - int method; + uint32_t uncompLen = 0; + uint16_t method; if (!zip->getEntryInfo(entry, &method, &uncompLen, NULL, NULL, NULL, NULL)) { ALOGW("%s: failed to read entry info\n", __FUNCTION__); return -1; } if (method != ZipFileRO::kCompressDeflated) { - ALOGW("%s: cannot handle zip compression method %d\n", __FUNCTION__, method); + ALOGW("%s: cannot handle zip compression method %" PRIu16 "\n", __FUNCTION__, method); return -1; } FileMap *dataMap = zip->createEntryFileMap(entry); @@ -147,19 +148,19 @@ namespace { } char *buf = new char[uncompLen]; if (NULL == buf) { - ALOGW("%s: failed to allocate %zd byte\n", __FUNCTION__, uncompLen); + ALOGW("%s: failed to allocate %" PRIu32 " byte\n", __FUNCTION__, uncompLen); delete dataMap; return -1; } StreamingZipInflater inflater(dataMap, uncompLen); if (inflater.read(buf, uncompLen) < 0) { - ALOGW("%s: failed to inflate %zd byte\n", __FUNCTION__, uncompLen); + ALOGW("%s: failed to inflate %" PRIu32 " byte\n", __FUNCTION__, uncompLen); delete[] buf; delete dataMap; return -1; } - int priority = parse_manifest(buf, uncompLen, target_package_name); + int priority = parse_manifest(buf, static_cast<size_t>(uncompLen), target_package_name); delete[] buf; delete dataMap; return priority; |