From ba5b0e33252ab52365f1d6de89247c05350e3240 Mon Sep 17 00:00:00 2001 From: Louis Wilson Date: Thu, 20 Apr 2023 16:00:21 -0700 Subject: [PATCH] Fix C4365 (signed/unsigned mismatch) warning on 32-bit Windows --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index d370358a62d9..04deefd33db8 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -225,7 +225,7 @@ inline auto clzll(uint64_t x) -> int { _BitScanReverse64(&r, x); # else // Scan the high 32 bits. - if (_BitScanReverse(&r, static_cast(x >> 32))) return 63 ^ (r + 32); + if (_BitScanReverse(&r, static_cast(x >> 32))) return 63 ^ static_cast(r + 32); // Scan the low 32 bits. _BitScanReverse(&r, static_cast(x)); # endif