From 0c5603e07bed1d5fbb45e38f9bdf0e4560fde3f0 Mon Sep 17 00:00:00 2001 From: Eugene Kliuchnikov Date: Thu, 9 Jul 2020 16:40:01 +0200 Subject: Fix output parameter type for _BitScanReverse (#819) Fix #811 --- c/common/platform.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/common/platform.h b/c/common/platform.h index 76b6bba..3306cf9 100644 --- a/c/common/platform.h +++ b/c/common/platform.h @@ -549,9 +549,9 @@ static BROTLI_INLINE uint32_t BrotliBsf64Msvc(uint64_t x) { #define BROTLI_BSR32(x) (31u ^ (uint32_t)__builtin_clz(x)) #elif BROTLI_MSVC_VERSION_CHECK(12, 0, 0) static BROTLI_INLINE uint32_t BrotliBsr32Msvc(uint32_t x) { - uint32_t msb; + unsigned long msb; _BitScanReverse(&msb, x); - return msb; + return (uint32_t)msb; } #define BROTLI_BSR32 BrotliBsr32Msvc #endif /* __builtin_clz */ -- cgit v1.1