summaryrefslogtreecommitdiff
path: root/tools/zipalign/ZipFile.cpp
diff options
context:
space:
mode:
author Fabien Sanglard <sanglardf@google.com> 2021-09-13 16:52:22 -0700
committer Fabien Sanglard <sanglardf@google.com> 2021-09-13 16:52:22 -0700
commit1011d45f5b5230fdc031f654f701e511dd4d935c (patch)
treeb070fdd1b2dbb57d23a5485ec682ad99325211ca /tools/zipalign/ZipFile.cpp
parent97e0c2831d568491034ef5421d2a3253f423f7f1 (diff)
Zipalign: Remove unused variables
Remove unused variable resulting in compilation warnings. Remove unused temporary variable. Bug: NA Test: zipalign_tests Change-Id: Ic2236b5878074f0c2537ab0b9f94dfd9c42225d8
Diffstat (limited to 'tools/zipalign/ZipFile.cpp')
-rw-r--r--tools/zipalign/ZipFile.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/zipalign/ZipFile.cpp b/tools/zipalign/ZipFile.cpp
index 1e3c4135f1..6037d595da 100644
--- a/tools/zipalign/ZipFile.cpp
+++ b/tools/zipalign/ZipFile.cpp
@@ -654,7 +654,7 @@ status_t ZipFile::addRecompress(const ZipFile* pSourceZip, const ZipEntry* pSour
{
ZipEntry* pEntry = NULL;
status_t result;
- long lfhPosn, startPosn, endPosn, uncompressedLen;
+ long lfhPosn, uncompressedLen;
if (mReadOnly)
return INVALID_OPERATION;
@@ -690,7 +690,6 @@ status_t ZipFile::addRecompress(const ZipFile* pSourceZip, const ZipEntry* pSour
*/
lfhPosn = ftell(mZipFp);
pEntry->mLFH.write(mZipFp);
- startPosn = ftell(mZipFp);
/*
* Copy the data over.
@@ -741,18 +740,13 @@ status_t ZipFile::addRecompress(const ZipFile* pSourceZip, const ZipEntry* pSour
}
/*
- * Update file offsets.
- */
- endPosn = ftell(mZipFp);
-
- /*
* Success! Fill out new values.
*/
pEntry->setLFHOffset(lfhPosn);
mEOCD.mNumEntries++;
mEOCD.mTotalNumEntries++;
mEOCD.mCentralDirSize = 0; // mark invalid; set by flush()
- mEOCD.mCentralDirOffset = endPosn;
+ mEOCD.mCentralDirOffset = ftell(mZipFp);
/*
* Go back and write the LFH.