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
This commit is contained in:
James Zern 2015-01-16 17:46:38 -08:00
parent 5487529368
commit c5f7747fc5

View File

@ -45,5 +45,5 @@ void VP8LColorCacheCopy(const VP8LColorCache* const src,
assert(dst != NULL); assert(dst != NULL);
assert(src->hash_bits_ == dst->hash_bits_); assert(src->hash_bits_ == dst->hash_bits_);
memcpy(dst->colors_, src->colors_, memcpy(dst->colors_, src->colors_,
(size_t)(1 << dst->hash_bits_) * sizeof(*dst->colors_)); ((size_t)1u << dst->hash_bits_) * sizeof(*dst->colors_));
} }