diff options
| author | 2018-08-10 15:14:26 -0700 | |
|---|---|---|
| committer | 2018-08-10 15:14:26 -0700 | |
| commit | 0c0d92887c8ee1721fdead2fd4a75bf00b2336c5 (patch) | |
| tree | 8775dd4d79141f6ca2af0f03836e488bbdab8bda /tools/zipalign/ZipEntry.cpp | |
| parent | edeab211d2cbdc3cde1e9b95ea540da237b03cf7 (diff) | |
Fix or suppress some google-runtime-int warnings.
Bug: 112478838
Test: build with WITH_TIDY=1
Change-Id: Ie3b15a85770b5806cddfd49a475aaf0553f9ec78
Diffstat (limited to 'tools/zipalign/ZipEntry.cpp')
| -rw-r--r-- | tools/zipalign/ZipEntry.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/zipalign/ZipEntry.cpp b/tools/zipalign/ZipEntry.cpp index 63d75d1057..c3c833efe9 100644 --- a/tools/zipalign/ZipEntry.cpp +++ b/tools/zipalign/ZipEntry.cpp @@ -41,7 +41,7 @@ using namespace android; status_t ZipEntry::initFromCDE(FILE* fp) { status_t result; - long posn; + long posn; // NOLINT(google-runtime-int), for ftell/fseek bool hasDD; //ALOGV("initFromCDE ---\n"); @@ -258,8 +258,8 @@ void ZipEntry::copyCDEtoLFH(void) /* * Set some information about a file after we add it. */ -void ZipEntry::setDataInfo(long uncompLen, long compLen, uint32_t crc32, - int compressionMethod) +void ZipEntry::setDataInfo(uint32_t uncompLen, uint32_t compLen, uint32_t crc32, + uint32_t compressionMethod) { mCDE.mCompressionMethod = compressionMethod; mCDE.mCRC32 = crc32; @@ -367,7 +367,7 @@ void ZipEntry::setModWhen(time_t when) struct tm* ptm; /* round up to an even number of seconds */ - even = (time_t)(((unsigned long)(when) + 1) & (~1)); + even = (when & 1) ? (when + 1) : when; /* expand */ #if !defined(_WIN32) |