Fix or suppress some google-runtime-int warnings.
Bug: 112478838
Test: build with WITH_TIDY=1
Change-Id: Ie3b15a85770b5806cddfd49a475aaf0553f9ec78
diff --git a/tools/zipalign/ZipFile.cpp b/tools/zipalign/ZipFile.cpp
index 43bc9bf..9e44956 100644
--- a/tools/zipalign/ZipFile.cpp
+++ b/tools/zipalign/ZipFile.cpp
@@ -804,7 +804,7 @@
* 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 @@
*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;
}