diff options
author | Colin Cross <ccross@android.com> | 2014-02-05 17:30:31 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2014-02-05 17:34:45 -0800 |
commit | 92cdf9c37225c6f76b96c8f137896cd9e9015bbd (patch) | |
tree | dbf70c82b2e8d48e6d6515689b47cfe327f71b49 /minzip | |
parent | f353207298ed14d0e6943353dd9788421a7537b8 (diff) | |
download | bootable_recovery-92cdf9c37225c6f76b96c8f137896cd9e9015bbd.zip bootable_recovery-92cdf9c37225c6f76b96c8f137896cd9e9015bbd.tar.gz bootable_recovery-92cdf9c37225c6f76b96c8f137896cd9e9015bbd.tar.bz2 |
recovery: fix building with pointer-to-int errors turned on
Use intptr_t/uintptr_t to cast between pointer and int to allow
building with -Werror=pointer-to-int-cast and
Werror=int-to-pointer-cast turned on.
Cast to char* instead of unsigned int for pointer arithmetic.
Change-Id: Ia862306fdcca53866b330e8cf726f3d62f2248a0
Diffstat (limited to 'minzip')
-rw-r--r-- | minzip/Zip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/minzip/Zip.c b/minzip/Zip.c index 439e5d9..f4f38a9 100644 --- a/minzip/Zip.c +++ b/minzip/Zip.c @@ -772,7 +772,7 @@ bool mzReadZipEntry(const ZipArchive* pArchive, const ZipEntry* pEntry, static bool writeProcessFunction(const unsigned char *data, int dataLen, void *cookie) { - int fd = (int)cookie; + int fd = (int)(intptr_t)cookie; ssize_t soFar = 0; while (true) { @@ -802,7 +802,7 @@ bool mzExtractZipEntryToFile(const ZipArchive *pArchive, const ZipEntry *pEntry, int fd) { bool ret = mzProcessZipEntryContents(pArchive, pEntry, writeProcessFunction, - (void*)fd); + (void*)(intptr_t)fd); if (!ret) { LOGE("Can't extract entry to file.\n"); return false; |