diff options
author | Marcus Haehnel <marcus.haehnel@kernkonzept.com> | 2024-07-09 09:38:40 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-07-09 09:53:20 +0200 |
commit | 5820f4b5860f97c66b01bc8e25ea876ae4f07478 (patch) | |
tree | 026ab686123461d5f89258d0fc41221285679002 /libm/nan.c | |
parent | 6271f8e869a4369b3bbcdd8a58ccce876eeae49b (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/nan.c')
-rw-r--r-- | libm/nan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libm/nan.c b/libm/nan.c index 454734b6f..9c2cd6e90 100644 --- a/libm/nan.c +++ b/libm/nan.c @@ -28,7 +28,7 @@ double nan (const char *tagp) sprintf (buf, "NAN(%s)", tagp); return strtod (buf, NULL); } - return NAN; + return (double)NAN; } libm_hidden_def(nan) @@ -53,7 +53,7 @@ long double nanl (const char *tagp) sprintf (buf, "NAN(%s)", tagp); return strtold (buf, NULL); } - return NAN; + return (long double)NAN; } libm_hidden_def(nanl) #endif |