From b1662b05303b2acb02530f13f76d4707a6c92ebe Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 21 Dec 2011 15:46:19 -0800 Subject: [PATCH] fix some more type conversion warnings w/MSVC API & memory related warnings will be dealt with separately Change-Id: I8a7893baa4d5035c963fb3c16e0bb4eee742e968 --- src/dec/idec.c | 4 ++-- src/utils/alpha.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dec/idec.c b/src/dec/idec.c index a22232bf..5e127be9 100644 --- a/src/dec/idec.c +++ b/src/dec/idec.c @@ -98,8 +98,8 @@ static int AppendToMemBuffer(WebPIDecoder* const idec, if (mem->end_ + data_size > mem->buf_size_) { // Need some free memory int p; uint8_t* new_buf = NULL; - const int num_chunks = (MemDataSize(mem) + data_size + CHUNK_SIZE - 1) - / CHUNK_SIZE; + const size_t num_chunks = + (MemDataSize(mem) + data_size + CHUNK_SIZE - 1) / CHUNK_SIZE; const size_t new_size = num_chunks * CHUNK_SIZE; const uint8_t* const base = mem->buf_ + mem->start_; diff --git a/src/utils/alpha.c b/src/utils/alpha.c index 9d9e31fb..831d95f6 100644 --- a/src/utils/alpha.c +++ b/src/utils/alpha.c @@ -116,7 +116,7 @@ static int EncodeZlibTCoder(const uint8_t* data, int width, int height, best.literal = data[n]; best.len = 1; for (dist = 1; dist <= MAX_DIST && dist <= n; ++dist) { - const int pos = n - dist; + const size_t pos = n - dist; const size_t min_len = best.len - 1; size_t len;