From c5f7747fc5f00e0fb86e0758b369c079d65157f3 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 16 Jan 2015 17:46:38 -0800 Subject: [PATCH] VP8LColorCacheCopy: promote an int before shifting quiets an msvs /analyze warning, the cast is due to an earlier msvs build warning. C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value. Change-Id: I0bb6cda57879f2fbd1e3515f6753a11bc08d14ac --- src/utils/color_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/color_cache.c b/src/utils/color_cache.c index 4746eeae..f9ff4b54 100644 --- a/src/utils/color_cache.c +++ b/src/utils/color_cache.c @@ -45,5 +45,5 @@ void VP8LColorCacheCopy(const VP8LColorCache* const src, assert(dst != NULL); assert(src->hash_bits_ == dst->hash_bits_); memcpy(dst->colors_, src->colors_, - (size_t)(1 << dst->hash_bits_) * sizeof(*dst->colors_)); + ((size_t)1u << dst->hash_bits_) * sizeof(*dst->colors_)); }