diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-03-07 15:08:07 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-03-07 15:08:07 +0000 |
commit | 950dedf58a4c624a4f53e25ce0380fca476035db (patch) | |
tree | 856e0788fccad28597426c764a8744b1e70654c5 | |
parent | 3ae342433e5c5cf5528103cf2ac57e651c9bdd81 (diff) | |
download | mpfr-950dedf58a4c624a4f53e25ce0380fca476035db.tar.gz |
tgeneric.c: avoid a warning with gcc 4.2+ about a test that is always
true (the style of the code is now a bit better too).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5335 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tgeneric.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/tgeneric.c b/tests/tgeneric.c index 7add197eb..00d8982bc 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -43,13 +43,14 @@ MA 02110-1301, USA. */ #define TEST_RANDOM_EMAX 255 #endif +/* The (void *) below is needed to avoid a warning with gcc 4.2+. */ #define TGENERIC_FAIL(S, X, U) \ do \ { \ printf ("%s\nx = ", (S)); \ mpfr_out_str (stdout, 2, 0, (X), GMP_RNDN); \ printf ("\n"); \ - if (U) \ + if (U != (void *) 0) \ { \ printf ("u = "); \ mpfr_out_str (stdout, 2, 0, (U), GMP_RNDN); \ |