From 5820f4b5860f97c66b01bc8e25ea876ae4f07478 Mon Sep 17 00:00:00 2001 From: Marcus Haehnel Date: Tue, 9 Jul 2024 09:38:40 +0200 Subject: 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 Signed-off-by: Marcus Haehnel --- libc/stdio/_fpmaxtostr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/stdio') 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 -- cgit v1.2.3