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 1e2e25b0d4)
This commit is contained in:
James Zern 2016-12-12 19:06:14 -08:00
parent d9120271e7
commit aa7744ca38

View File

@ -55,8 +55,8 @@ static int AllocateFrames(AnimatedImage* const image, uint32_t num_frames) {
!CheckSizeForOverflow(total_frame_size)) { !CheckSizeForOverflow(total_frame_size)) {
return 0; return 0;
} }
mem = (uint8_t*)malloc(total_size); mem = (uint8_t*)malloc((size_t)total_size);
frames = (DecodedFrame*)malloc(total_frame_size); frames = (DecodedFrame*)malloc((size_t)total_frame_size);
if (mem == NULL || frames == NULL) { if (mem == NULL || frames == NULL) {
free(mem); free(mem);