[libc-commits] [libc] 8a0ff19 - [libc] Fix type warning on gcc in float to str (#79482)
via libc-commits
libc-commits at lists.llvm.org
Thu Jan 25 10:39:15 PST 2024
Author: michaelrj-google
Date: 2024-01-25T10:39:11-08:00
New Revision: 8a0ff194e3f9441d35c87d565e093335371a9578
URL: https://github.com/llvm/llvm-project/commit/8a0ff194e3f9441d35c87d565e093335371a9578
DIFF: https://github.com/llvm/llvm-project/commit/8a0ff194e3f9441d35c87d565e093335371a9578.diff
LOG: [libc] Fix type warning on gcc in float to str (#79482)
Minor cast warning that was missed in previous patch. Fixed with
explicit cast.
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 4dc9d6eb3cb7352..1431aeffa5b2108 100644
--- a/libc/src/__support/float_to_string.h
+++ b/libc/src/__support/float_to_string.h
@@ -503,7 +503,7 @@ class FloatToString {
cpp::UInt<MID_INT_SIZE> val;
- const uint32_t pos_exp = idx * IDX_SIZE;
+ const uint32_t pos_exp = static_cast<uint32_t>(idx * IDX_SIZE);
#if defined(LIBC_COPT_FLOAT_TO_STR_USE_DYADIC_FLOAT)
// ----------------------- DYADIC FLOAT CALC MODE ------------------------
More information about the libc-commits
mailing list