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;