diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-04-11 13:16:15 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-04-11 13:16:15 +0000 |
commit | e9dc7e9f72cc13e5dfdd3cca1a56b2d4cc823e95 (patch) | |
tree | 1e38ee4c4b996c7be4d3507160bfbd44119feeff /tests/tsub1sp.c | |
parent | 992fd7f44f50b6584ae807f718897bf68e3fb00d (diff) | |
download | mpfr-e9dc7e9f72cc13e5dfdd3cca1a56b2d4cc823e95.tar.gz |
Fixed type errors with -D_MPFR_PREC_FORMAT=2 in CFLAGS and the
--enable-assert=full configure option (signaled by GCC's -Wformat).
(merged changesets r12301-12302 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/4.0@12578 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tsub1sp.c')
-rw-r--r-- | tests/tsub1sp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/tsub1sp.c b/tests/tsub1sp.c index adc4e3aef..ff3c1506b 100644 --- a/tests/tsub1sp.c +++ b/tests/tsub1sp.c @@ -269,7 +269,8 @@ bug20171213_gen (mpfr_prec_t pmax) mpfr_div_2exp (d, d, e, MPFR_RNDN); /* b = 1 - 2^(-e) */ if (! mpfr_equal_p (a, d)) { - printf ("bug20171213_gen failed for p=%lu, e=%lu\n", p, e); + printf ("bug20171213_gen failed for p=%ld, e=%ld\n", + (long) p, (long) e); printf ("b="); mpfr_dump (b); printf ("c="); mpfr_dump (c); printf ("got a="); mpfr_dump (a); @@ -887,8 +888,8 @@ check_underflow (mpfr_prec_t p) inexact = mpfr_sub (x, y, z, MPFR_RNDN); if (inexact >= 0 || (mpfr_cmp_ui (x, 0) != 0)) { - printf ("4*2^(emin-2) - 3*2^(emin-2) with RNDN failed for p=%lu\n", - p); + printf ("4*2^(emin-2) - 3*2^(emin-2) with RNDN failed for p=%ld\n", + (long) p); printf ("Expected inexact < 0 with x=0\n"); printf ("Got inexact=%d with x=", inexact); mpfr_dump (x); @@ -903,8 +904,8 @@ check_underflow (mpfr_prec_t p) inexact = mpfr_sub (x, y, z, MPFR_RNDN); if (inexact >= 0 || (mpfr_cmp_ui (x, 0) != 0)) { - printf ("5*2^(emin-2) - 4*2^(emin-2) with RNDN failed for p=%lu\n", - p); + printf ("5*2^(emin-2) - 4*2^(emin-2) with RNDN failed for p=%ld\n", + (long) p); printf ("Expected inexact < 0 with x=0\n"); printf ("Got inexact=%d with x=", inexact); mpfr_dump (x); |