[libc-commits] [libc] [libc][NFC] fix int warnings in float conversion (PR #74379)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Mon Dec 4 14:51:37 PST 2023
================
@@ -490,7 +490,7 @@ class FloatToString {
val = POW10_SPLIT[POW10_OFFSET[idx] + block_index];
#endif
const uint32_t shift_amount =
- static_cast<uint32_t>(SHIFT_CONST + (IDX_SIZE * idx) - exponent);
+ SHIFT_CONST + static_cast<uint32_t>(IDX_SIZE * idx) - exponent;
----------------
nickdesaulniers wrote:
here `idx` is a `uint32_t`, so the cast only need be on IDX_SIZE
https://github.com/llvm/llvm-project/pull/74379
More information about the libc-commits
mailing list