[libc-commits] [libc] a539a09 - [libc] Fix missing UInt initialization (#74869)
via libc-commits
libc-commits at lists.llvm.org
Fri Dec 8 09:12:39 PST 2023
Author: Guillaume Chatelet
Date: 2023-12-08T18:12:35+01:00
New Revision: a539a090009378ecfcfbfaaa280eeac8f5b9d695
URL: https://github.com/llvm/llvm-project/commit/a539a090009378ecfcfbfaaa280eeac8f5b9d695
DIFF: https://github.com/llvm/llvm-project/commit/a539a090009378ecfcfbfaaa280eeac8f5b9d695.diff
LOG: [libc] Fix missing UInt initialization (#74869)
Fix forward for #74862
Added:
Modified:
libc/src/__support/float_to_string.h
Removed:
################################################################################
diff --git a/libc/src/__support/float_to_string.h b/libc/src/__support/float_to_string.h
index 9f24352281fb7..92dd2e8f7e903 100644
--- a/libc/src/__support/float_to_string.h
+++ b/libc/src/__support/float_to_string.h
@@ -653,7 +653,7 @@ FloatToString<long double>::get_positive_block(int block_index) {
// shift_amount = -(c0 - exponent) = c_0 + 16 * ceil(exponent/16) - exponent
- cpp::UInt<MID_INT_SIZE> val;
+ cpp::UInt<MID_INT_SIZE> val(0);
#ifdef LIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE
// ------------------------------ TABLE MODE -------------------------------
const int32_t SHIFT_CONST = TABLE_SHIFT_CONST;
More information about the libc-commits
mailing list