]> Savannah Git Hosting - gnulib.git/commitdiff
snan tests: Fix "unused variable" warnings on i386.
authorBruno Haible <bruno@clisp.org>
Sat, 14 Oct 2023 18:36:37 +0000 (20:36 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 14 Oct 2023 18:36:37 +0000 (20:36 +0200)
* tests/test-snan-1.c (main): Mark nanf, nand, nanl as possibly unused.
* tests/test-snan-2.c (main): Likewise.

ChangeLog
tests/test-snan-1.c
tests/test-snan-2.c

index eb1271eb65de1dc9473bc0111e473a4657ead3b2..0fe658e2d3bbf03184389edcc8ca750fc0136ecc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-10-14  Bruno Haible  <bruno@clisp.org>
+
+       snan tests: Fix "unused variable" warnings on i386.
+       * tests/test-snan-1.c (main): Mark nanf, nand, nanl as possibly unused.
+       * tests/test-snan-2.c (main): Likewise.
+
 2023-10-14  Bruno Haible  <bruno@clisp.org>
 
        snan: Avoid test failures with CC="gcc -mfpmath=387".
index 911d20bd7038e2d30d716f844cc6e022ef29b30a..7b71b9a57bce3a92e3154bd7ebed971ff919f569 100644 (file)
@@ -56,9 +56,9 @@ main ()
      The use of 'volatile' prevents the compiler from doing constant-folding
      optimizations on these values.  An alternative, for GCC only, would be
      the command-line option '-fsignaling-nans'.  */
-  float volatile nanf = SNaNf ();
-  double volatile nand = SNaNd ();
-  long double volatile nanl = SNaNl ();
+  _GL_UNUSED float volatile nanf = SNaNf ();
+  _GL_UNUSED double volatile nand = SNaNd ();
+  _GL_UNUSED long double volatile nanl = SNaNl ();
 
   /* Check that the values are really signalling.  */
   /* These tests do not work on 32-bit x86 processors, as well as
index 4ddd3ac9b13890a6bd595465aa6f44c3f0aee49d..5e5940609c8e7e197da67d97f3e58f6d21f3edf3 100644 (file)
@@ -44,9 +44,9 @@ main (int argc, char *argv[])
      The use of 'volatile' prevents the compiler from doing constant-folding
      optimizations on these values.  An alternative, for GCC only, would be
      the command-line option '-fsignaling-nans'.  */
-  float volatile nanf = SNaNf ();
-  double volatile nand = SNaNd ();
-  long double volatile nanl = SNaNl ();
+  _GL_UNUSED float volatile nanf = SNaNf ();
+  _GL_UNUSED double volatile nand = SNaNd ();
+  _GL_UNUSED long double volatile nanl = SNaNl ();
 
   /* Check that the values are really signalling.  */