summaryrefslogtreecommitdiff
path: root/libc/stdio/_fpmaxtostr.c
diff options
context:
space:
mode:
authorMarcus Haehnel <marcus.haehnel@kernkonzept.com>2024-07-09 09:38:40 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2024-07-09 09:53:20 +0200
commit5820f4b5860f97c66b01bc8e25ea876ae4f07478 (patch)
tree026ab686123461d5f89258d0fc41221285679002 /libc/stdio/_fpmaxtostr.c
parent6271f8e869a4369b3bbcdd8a58ccce876eeae49b (diff)
uclibc: Fix double promotion warning
Add casts where necessary to convince clang that the promotion of float to double is intentional. Co-authored-by: Sven Linker <sven.linker@kernkonzept.com> Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
Diffstat (limited to 'libc/stdio/_fpmaxtostr.c')
-rw-r--r--libc/stdio/_fpmaxtostr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/stdio/_fpmaxtostr.c b/libc/stdio/_fpmaxtostr.c
index b06b25aa0..1f268fdaa 100644
--- a/libc/stdio/_fpmaxtostr.c
+++ b/libc/stdio/_fpmaxtostr.c
@@ -318,8 +318,8 @@ ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
#else /* __UCLIBC_HAS_HEXADECIMAL_FLOATS__ */
-#define lower_bnd 1e8
-#define upper_bnd 1e9
+#define lower_bnd (__fpmax_t)1e8
+#define upper_bnd (__fpmax_t)1e9
#define power_table exp10_table
#define dpb DIGITS_PER_BLOCK
#define base 10