summaryrefslogtreecommitdiff
path: root/libm/w_cabs.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 /libm/w_cabs.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 'libm/w_cabs.c')
-rw-r--r--libm/w_cabs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libm/w_cabs.c b/libm/w_cabs.c
index b2592484c..546b6affa 100644
--- a/libm/w_cabs.c
+++ b/libm/w_cabs.c
@@ -17,7 +17,7 @@ libm_hidden_def(cabs)
libm_hidden_proto(cabsf)
float cabsf(float _Complex z)
{
- return (float) hypot(__real__ z, __imag__ z);
+ return (float) hypot((double)__real__ z, (double)__imag__ z);
}
libm_hidden_def(cabsf)