From 0c0d92887c8ee1721fdead2fd4a75bf00b2336c5 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Fri, 10 Aug 2018 15:14:26 -0700 Subject: Fix or suppress some google-runtime-int warnings. Bug: 112478838 Test: build with WITH_TIDY=1 Change-Id: Ie3b15a85770b5806cddfd49a475aaf0553f9ec78 --- tools/zipalign/ZipFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/zipalign/ZipFile.cpp') diff --git a/tools/zipalign/ZipFile.cpp b/tools/zipalign/ZipFile.cpp index 43bc9bfb59..9e44956e6e 100644 --- a/tools/zipalign/ZipFile.cpp +++ b/tools/zipalign/ZipFile.cpp @@ -804,7 +804,7 @@ status_t ZipFile::copyDataToFp(FILE* dstFp, * On exit, "srcFp" will be seeked to the end of the file, and "dstFp" * will be seeked immediately past the data just written. */ -status_t ZipFile::copyPartialFpToFp(FILE* dstFp, FILE* srcFp, long length, +status_t ZipFile::copyPartialFpToFp(FILE* dstFp, FILE* srcFp, size_t length, uint32_t* pCRC32) { uint8_t tmpBuf[32768]; @@ -814,14 +814,14 @@ status_t ZipFile::copyPartialFpToFp(FILE* dstFp, FILE* srcFp, long length, *pCRC32 = crc32(0L, Z_NULL, 0); while (length) { - long readSize; + size_t readSize; readSize = sizeof(tmpBuf); if (readSize > length) readSize = length; count = fread(tmpBuf, 1, readSize, srcFp); - if ((long) count != readSize) { // error or unexpected EOF + if (count != readSize) { // error or unexpected EOF ALOGD("fread %d bytes failed\n", (int) readSize); return UNKNOWN_ERROR; } -- cgit v1.2.3-59-g8ed1b