[libc-commits] [libc] [libc] Fix missing UInt initialization (PR #74869)
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Fri Dec 8 09:12:03 PST 2023
https://github.com/gchatelet created https://github.com/llvm/llvm-project/pull/74869
Fix forward for #74862
>From 1131e941e244ace36dc36dba9cd199e9fad71fe4 Mon Sep 17 00:00:00 2001
From: Guillaume Chatelet <gchatelet at google.com>
Date: Fri, 8 Dec 2023 17:11:12 +0000
Subject: [PATCH] [libc] Fix missing UInt initialization
---
libc/src/__support/float_to_string.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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