[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 16:20:49 PST 2023
================
@@ -537,7 +537,7 @@ LIBC_INLINE int convert_float_decimal_typed(Writer *writer,
}
if (exponent < MANT_WIDTH) {
- const uint32_t blocks = (precision / BLOCK_SIZE) + 1;
+ const uint32_t blocks = static_cast<uint32_t>(precision / BLOCK_SIZE) + 1;
----------------
nickdesaulniers wrote:
you can maybe get more specific here and below; the static_cast can be applied to just BLOCK_SIZE I suspect?
https://github.com/llvm/llvm-project/pull/74379
More information about the libc-commits
mailing list