summaryrefslogtreecommitdiff
path: root/tools/zipalign/ZipFile.cpp
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2018-08-10 15:14:26 -0700
committer Chih-Hung Hsieh <chh@google.com> 2018-08-10 15:14:26 -0700
commit0c0d92887c8ee1721fdead2fd4a75bf00b2336c5 (patch)
tree8775dd4d79141f6ca2af0f03836e488bbdab8bda /tools/zipalign/ZipFile.cpp
parentedeab211d2cbdc3cde1e9b95ea540da237b03cf7 (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/ZipFile.cpp')
-rw-r--r--tools/zipalign/ZipFile.cpp6
1 files changed, 3 insertions, 3 deletions
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;
}