Merge "androidfw: resolve 64-bit build issues"

This commit is contained in:
Mark Salyzyn
2014-03-19 19:36:51 +00:00
committed by Gerrit Code Review
6 changed files with 98 additions and 98 deletions

View File

@@ -84,18 +84,18 @@ Asset::Asset(void)
mNext = mPrev = NULL; mNext = mPrev = NULL;
if (gTail == NULL) { if (gTail == NULL) {
gHead = gTail = this; gHead = gTail = this;
} else { } else {
mPrev = gTail; mPrev = gTail;
gTail->mNext = this; gTail->mNext = this;
gTail = this; gTail = this;
} }
//ALOGI("Creating Asset %p #%d\n", this, gCount); //ALOGI("Creating Asset %p #%d\n", this, gCount);
} }
Asset::~Asset(void) Asset::~Asset(void)
{ {
AutoMutex _l(gAssetLock); AutoMutex _l(gAssetLock);
gCount--; gCount--;
if (gHead == this) { if (gHead == this) {
gHead = mNext; gHead = mNext;
} }

View File

@@ -568,8 +568,8 @@ int write_tarfile(const String8& packageName, const String8& domain,
// [ 108 : 8 ] uid -- ignored in Android format; uids are remapped at restore time // [ 108 : 8 ] uid -- ignored in Android format; uids are remapped at restore time
// [ 116 : 8 ] gid -- ignored in Android format // [ 116 : 8 ] gid -- ignored in Android format
snprintf(buf + 108, 8, "0%lo", s.st_uid); snprintf(buf + 108, 8, "0%lo", (unsigned long)s.st_uid);
snprintf(buf + 116, 8, "0%lo", s.st_gid); snprintf(buf + 116, 8, "0%lo", (unsigned long)s.st_gid);
// [ 124 : 12 ] file size in bytes // [ 124 : 12 ] file size in bytes
if (s.st_size > 077777777777LL) { if (s.st_size > 077777777777LL) {

View File

@@ -3147,7 +3147,7 @@ status_t ResTable::add(ResTable* src)
} }
status_t ResTable::addInternal(const void* data, size_t size, const int32_t cookie, status_t ResTable::addInternal(const void* data, size_t size, const int32_t cookie,
Asset* asset, bool copyData, const Asset* idmap) Asset* /*asset*/, bool copyData, const Asset* idmap)
{ {
if (!data) return NO_ERROR; if (!data) return NO_ERROR;
Header* header = new Header(this); Header* header = new Header(this);
@@ -3573,7 +3573,7 @@ ssize_t ResTable::resolveReference(Res_value* value, ssize_t blockIndex,
const char16_t* ResTable::valueToString( const char16_t* ResTable::valueToString(
const Res_value* value, size_t stringBlock, const Res_value* value, size_t stringBlock,
char16_t tmpBuffer[TMP_BUFFER_SIZE], size_t* outLen) char16_t /*tmpBuffer*/ [TMP_BUFFER_SIZE], size_t* outLen)
{ {
if (!value) { if (!value) {
return NULL; return NULL;
@@ -3596,7 +3596,7 @@ ssize_t ResTable::lockBag(uint32_t resID, const bag_entry** outBag) const
return err; return err;
} }
void ResTable::unlockBag(const bag_entry* bag) const void ResTable::unlockBag(const bag_entry* /*bag*/) const
{ {
//printf("<<< unlockBag %p\n", this); //printf("<<< unlockBag %p\n", this);
mLock.unlock(); mLock.unlock();

View File

@@ -127,7 +127,7 @@ static const unsigned long kReadBufSize = 32768;
goto z_bail; goto z_bail;
} }
/* output buffer holds all, so no need to write the output */ /* output buffer holds all, so no need to write the output */
} while (zerr == Z_OK); } while (zerr == Z_OK);
assert(zerr == Z_STREAM_END); /* other errors should've been caught */ assert(zerr == Z_STREAM_END); /* other errors should've been caught */
@@ -197,7 +197,7 @@ public:
{ {
} }
long read(unsigned char** nextBuffer, long readSize) { long read(unsigned char** nextBuffer, long /*readSize*/) {
if (!mBufferReturned) { if (!mBufferReturned) {
mBufferReturned = true; mBufferReturned = true;
*nextBuffer = mInput; *nextBuffer = mInput;