In the 'snan' tests, I see warnings about unused variables 'nanf', 'nand'. This patch silences them.
2023-10-14 Bruno Haible <br...@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. diff --git a/tests/test-snan-1.c b/tests/test-snan-1.c index 911d20bd70..7b71b9a57b 100644 --- a/tests/test-snan-1.c +++ b/tests/test-snan-1.c @@ -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 diff --git a/tests/test-snan-2.c b/tests/test-snan-2.c index 4ddd3ac9b1..5e5940609c 100644 --- a/tests/test-snan-2.c +++ b/tests/test-snan-2.c @@ -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. */