Zipalign: Remove unused variables

Remove unused variable resulting in compilation warnings.
Remove unused temporary variable.

Bug: NA
Test: zipalign_tests
Change-Id: Ic2236b5878074f0c2537ab0b9f94dfd9c42225d8
This commit is contained in:
Fabien Sanglard
2021-09-13 16:52:22 -07:00
parent 97e0c2831d
commit 1011d45f5b

View File

@@ -654,7 +654,7 @@ status_t ZipFile::addRecompress(const ZipFile* pSourceZip, const ZipEntry* pSour
{ {
ZipEntry* pEntry = NULL; ZipEntry* pEntry = NULL;
status_t result; status_t result;
long lfhPosn, startPosn, endPosn, uncompressedLen; long lfhPosn, uncompressedLen;
if (mReadOnly) if (mReadOnly)
return INVALID_OPERATION; return INVALID_OPERATION;
@@ -690,7 +690,6 @@ status_t ZipFile::addRecompress(const ZipFile* pSourceZip, const ZipEntry* pSour
*/ */
lfhPosn = ftell(mZipFp); lfhPosn = ftell(mZipFp);
pEntry->mLFH.write(mZipFp); pEntry->mLFH.write(mZipFp);
startPosn = ftell(mZipFp);
/* /*
* Copy the data over. * Copy the data over.
@@ -740,11 +739,6 @@ status_t ZipFile::addRecompress(const ZipFile* pSourceZip, const ZipEntry* pSour
} }
} }
/*
* Update file offsets.
*/
endPosn = ftell(mZipFp);
/* /*
* Success! Fill out new values. * Success! Fill out new values.
*/ */
@@ -752,7 +746,7 @@ status_t ZipFile::addRecompress(const ZipFile* pSourceZip, const ZipEntry* pSour
mEOCD.mNumEntries++; mEOCD.mNumEntries++;
mEOCD.mTotalNumEntries++; mEOCD.mTotalNumEntries++;
mEOCD.mCentralDirSize = 0; // mark invalid; set by flush() mEOCD.mCentralDirSize = 0; // mark invalid; set by flush()
mEOCD.mCentralDirOffset = endPosn; mEOCD.mCentralDirOffset = ftell(mZipFp);
/* /*
* Go back and write the LFH. * Go back and write the LFH.