[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:50:54 PST 2023
================
@@ -287,11 +287,11 @@ LIBC_INLINE cpp::UInt<MID_INT_SIZE> get_table_negative(int exponent, size_t i) {
if (block_shifts < static_cast<int>(ten_blocks)) {
ten_blocks = ten_blocks - block_shifts;
five_blocks = block_shifts;
- shift_amount = shift_amount + (block_shifts * BLOCK_SIZE);
+ shift_amount = shift_amount + static_cast<int>(block_shifts * BLOCK_SIZE);
----------------
nickdesaulniers wrote:
here `block_shifts` is an `int`, so the cast only need be on `BLOCK_SIZE`
https://github.com/llvm/llvm-project/pull/74379
More information about the libc-commits
mailing list