diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-05-06 14:48:20 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-05-06 14:48:20 -0400 |
commit | 4e597feef0595caefa39ab43c813734a1244fa84 (patch) | |
tree | 8f9b38b0792c11b0c144f5e2cbe7916be63532f6 /src/math/nextafterl.c | |
parent | a3b20f67b35e26813d02e08043db2a5d9263f255 (diff) | |
download | musl-4e597feef0595caefa39ab43c813734a1244fa84.tar.gz musl-4e597feef0595caefa39ab43c813734a1244fa84.tar.xz musl-4e597feef0595caefa39ab43c813734a1244fa84.zip |
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/nextafterl.c')
-rw-r--r-- | src/math/nextafterl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/math/nextafterl.c b/src/math/nextafterl.c index 611ea53d..c09d9dd0 100644 --- a/src/math/nextafterl.c +++ b/src/math/nextafterl.c @@ -39,7 +39,8 @@ long double nextafterl(long double x, long double y) return x + x; /* raise underflow if ux.value is subnormal or zero */ if (ux.bits.exp == 0) { - volatile float z = x*x + ux.value*ux.value; + volatile float z; + z = x*x + ux.value*ux.value; } return ux.value; } @@ -77,7 +78,8 @@ long double nextafterl(long double x, long double y) return x + x; /* raise underflow if ux.value is subnormal or zero */ if (ux.bits.exp == 0) { - volatile float z = x*x + ux.value*ux.value; + volatile float z; + z = x*x + ux.value*ux.value; } return ux.value; } |