diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-06-18 13:54:12 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-06-18 13:54:12 +0000 |
commit | faedfcc455336730d33f5ccb68a13233a520d115 (patch) | |
tree | ec4b0670157f250d82f478ac9ecb3aad0ed64785 | |
parent | faaa7c56c597c1b535ed2388c0c03b8c6a2eb4ba (diff) | |
download | mpfr-faedfcc455336730d33f5ccb68a13233a520d115.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). [merge -c5335]
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.3@5403 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 191ff3630..0396ef5b3 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -22,13 +22,14 @@ MA 02110-1301, USA. */ /* define TWO_ARGS for two-argument functions like mpfr_pow */ +/* 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); \ |