From 4e597feef0595caefa39ab43c813734a1244fa84 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 6 May 2012 14:48:20 -0400 Subject: 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). --- src/math/nexttoward.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/math/nexttoward.c') diff --git a/src/math/nexttoward.c b/src/math/nexttoward.c index 741b6b5f..43f8fee8 100644 --- a/src/math/nexttoward.c +++ b/src/math/nexttoward.c @@ -39,7 +39,8 @@ double nexttoward(double x, long double y) return x + x; /* raise underflow if ux.value is subnormal or zero */ if (e == 0) { - volatile float z = x*x + ux.value*ux.value; + volatile float z; + z = x*x + ux.value*ux.value; } return ux.value; } -- cgit v1.2.1