summaryrefslogtreecommitdiff
path: root/tests/tcmp_ld.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-05-20 15:42:02 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-05-20 15:42:02 +0000
commit92132f878010c7cc0552933fa1fab7b3bb779391 (patch)
treee8f0454e06e84c9e5b1cd5b4f744aea7257eb573 /tests/tcmp_ld.c
parentec667d25d1a861cc26de8e1fcf818dceab28b84b (diff)
downloadmpfr-92132f878010c7cc0552933fa1fab7b3bb779391.tar.gz
[tests/{tcmp_d.c,tcmp_ld.c,tget_d.c}] Avoid warnings concerning unused
variables when MPFR_ERRDIVZERO is defined (useful with -Werror). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9416 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcmp_ld.c')
-rw-r--r--tests/tcmp_ld.c47
1 files changed, 25 insertions, 22 deletions
diff --git a/tests/tcmp_ld.c b/tests/tcmp_ld.c
index af3a6e365..16f9573f5 100644
--- a/tests/tcmp_ld.c
+++ b/tests/tcmp_ld.c
@@ -26,7 +26,6 @@ int
main (void)
{
mpfr_t x;
- int c;
tests_start_mpfr ();
@@ -67,31 +66,35 @@ main (void)
#if !defined(MPFR_ERRDIVZERO)
/* Check NAN */
- mpfr_clear_erangeflag ();
- c = mpfr_cmp_ld (x, DBL_NAN);
- if (c != 0 || !mpfr_erangeflag_p ())
- {
- printf ("ERROR for NAN (1)\n");
+ {
+ int c;
+
+ mpfr_clear_erangeflag ();
+ c = mpfr_cmp_ld (x, DBL_NAN);
+ if (c != 0 || !mpfr_erangeflag_p ())
+ {
+ printf ("ERROR for NAN (1)\n");
#ifdef MPFR_NANISNAN
- printf ("The reason is that NAN == NAN. Please look at the configure "
- "output\nand Section \"In case of problem\" of the INSTALL "
- "file.\n");
+ printf ("The reason is that NAN == NAN. Please look at the configure "
+ "output\nand Section \"In case of problem\" of the INSTALL "
+ "file.\n");
#endif
- exit (1);
- }
- mpfr_set_nan (x);
- mpfr_clear_erangeflag ();
- c = mpfr_cmp_ld (x, 2.0);
- if (c != 0 || !mpfr_erangeflag_p ())
- {
- printf ("ERROR for NAN (2)\n");
+ exit (1);
+ }
+ mpfr_set_nan (x);
+ mpfr_clear_erangeflag ();
+ c = mpfr_cmp_ld (x, 2.0);
+ if (c != 0 || !mpfr_erangeflag_p ())
+ {
+ printf ("ERROR for NAN (2)\n");
#ifdef MPFR_NANISNAN
- printf ("The reason is that NAN == NAN. Please look at the configure "
- "output\nand Section \"In case of problem\" of the INSTALL "
- "file.\n");
+ printf ("The reason is that NAN == NAN. Please look at the configure "
+ "output\nand Section \"In case of problem\" of the INSTALL "
+ "file.\n");
#endif
- exit (1);
- }
+ exit (1);
+ }
+ }
#endif /* MPFR_ERRDIVZERO */
mpfr_clear(x);