From 52016c18c3c7cbdbc78cbbe370a8401fc01370c5 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Wed, 2 May 2012 12:30:00 +0800 Subject: Fixed 64-bit porting issues Fixed two issues about casting between int and pointer which cause compilation error in 64-bit mode (eg. for 64-bit emulator) Change-Id: I5ca9a933a239db73e56d6f27de05aa42bd06a650 --- libs/utils/ZipFileRO.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/utils/ZipFileRO.cpp') diff --git a/libs/utils/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp index cad772075b..db17546ff9 100644 --- a/libs/utils/ZipFileRO.cpp +++ b/libs/utils/ZipFileRO.cpp @@ -118,7 +118,7 @@ ZipFileRO::~ZipFileRO() { */ int ZipFileRO::entryToIndex(const ZipEntryRO entry) const { - long ent = ((long) entry) - kZipEntryAdj; + long ent = ((intptr_t) entry) - kZipEntryAdj; if (ent < 0 || ent >= mHashTableSize || mHashTable[ent].name == NULL) { ALOGW("Invalid ZipEntryRO %p (%ld)\n", entry, ent); return -1; @@ -459,7 +459,7 @@ ZipEntryRO ZipFileRO::findEntryByIndex(int idx) const for (int ent = 0; ent < mHashTableSize; ent++) { if (mHashTable[ent].name != NULL) { if (idx-- == 0) - return (ZipEntryRO) (ent + kZipEntryAdj); + return (ZipEntryRO) (intptr_t)(ent + kZipEntryAdj); } } -- cgit v1.2.3-59-g8ed1b