From aa7744ca38c475a4d926c4afebd49ddfaa6dbce3 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 12 Dec 2016 19:06:14 -0800 Subject: [PATCH] anim_util: quiet implicit conv warnings in 32-bit the sizes are already validated by CheckSizeForOverflow(), add casts to size_t to avoid -Wshorten-64-to-32 Change-Id: Ida9102c2104f4a334a0ad16d6e01a12bedfd4eec (cherry picked from commit 1e2e25b0d4349e2bd6ef95d791fbf651b5e52cc0) --- examples/anim_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/anim_util.c b/examples/anim_util.c index 464c4c38..47fc4ef8 100644 --- a/examples/anim_util.c +++ b/examples/anim_util.c @@ -55,8 +55,8 @@ static int AllocateFrames(AnimatedImage* const image, uint32_t num_frames) { !CheckSizeForOverflow(total_frame_size)) { return 0; } - mem = (uint8_t*)malloc(total_size); - frames = (DecodedFrame*)malloc(total_frame_size); + mem = (uint8_t*)malloc((size_t)total_size); + frames = (DecodedFrame*)malloc((size_t)total_frame_size); if (mem == NULL || frames == NULL) { free(mem);