diff --git a/c/enc/bit_cost.h b/c/enc/bit_cost.h index 6586469..31838f1 100644 --- a/c/enc/bit_cost.h +++ b/c/enc/bit_cost.h @@ -45,7 +45,7 @@ static BROTLI_INLINE double BitsEntropy( const uint32_t* population, size_t size) { size_t sum; double retval = ShannonEntropy(population, size, &sum); - if (retval < sum) { + if (retval < (double)sum) { /* At least one bit per literal is needed. */ retval = (double)sum; }