musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/math/nextafter.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012年05月06日 14:48:20 -0400
committerRich Felker <dalias@aerifal.cx>2012年05月06日 14:48:20 -0400
commit4e597feef0595caefa39ab43c813734a1244fa84 (patch)
tree8f9b38b0792c11b0c144f5e2cbe7916be63532f6 /src/math/nextafter.c
parenta3b20f67b35e26813d02e08043db2a5d9263f255 (diff)
downloadmusl-4e597feef0595caefa39ab43c813734a1244fa84.tar.gz
fix unused variable warnings in new nextafter/nexttoward code
apparently initializing a variable is not "using" it but assigning to it is "using" it. i don't really like this fix, but it's better than trying to make a bigger cleanup just before a release, and it should work fine (tested against nsz's math tests).
Diffstat (limited to 'src/math/nextafter.c')
-rw-r--r--src/math/nextafter.c 3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/math/nextafter.c b/src/math/nextafter.c
index d9e29236..e4bfb022 100644
--- a/src/math/nextafter.c
+++ b/src/math/nextafter.c
@@ -30,7 +30,8 @@ double nextafter(double x, double y)
return x + x;
/* raise underflow if ux.value is subnormal or zero */
if (e == 0) {
- volatile double z = x*x + ux.value*ux.value;
+ volatile double z;
+ z = x*x + ux.value*ux.value;
}
return ux.value;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月06日 06:56:13 +0000

AltStyle によって変換されたページ (->オリジナル) /