From 2a3fe56479fa3d83aac10c776df8c7625902a26e Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Thu, 26 Jan 2023 00:33:43 +0400 Subject: [PATCH] Visual Studio 2022: fmt/format-inl.h(1145,60): warning C4310: cast truncates constant value #3287 --- include/fmt/format-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index a4bf1edb..3b00bd67 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1142,7 +1142,7 @@ FMT_INLINE int remove_trailing_zeros(uint32_t& n) noexcept { // See https://github.com/fmtlib/fmt/issues/3163 for more details. const uint32_t mod_inv_5 = 0xcccccccd; // Casts are needed to workaround a bug in MSVC 19.22 and older. - const uint32_t mod_inv_25 = uint32_t(uint64_t(mod_inv_5) * mod_inv_5); + const uint32_t mod_inv_25 = static_cast(uint64_t(mod_inv_5) * mod_inv_5); int s = 0; while (true) {