diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-06-21 11:53:16 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-06-21 11:53:16 +0000 |
commit | b6cf60ef092b5bb353cf364a517ce2d0005cfcdd (patch) | |
tree | f30f993c052459e25a34b39200a9b1a74475072e /tests | |
parent | c599cd48f2238d6198a580c279011d34b64148c6 (diff) | |
download | mpfr-b6cf60ef092b5bb353cf364a517ce2d0005cfcdd.tar.gz |
Corrected mpfr_inits, mpfr_inits2 and mpfr_clears calls with NULL
argument (-> (void *) 0).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4557 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tabs.c | 4 | ||||
-rw-r--r-- | tests/tadd.c | 2 | ||||
-rw-r--r-- | tests/tadd1sp.c | 12 | ||||
-rw-r--r-- | tests/tadd_ui.c | 4 | ||||
-rw-r--r-- | tests/tagm.c | 4 | ||||
-rw-r--r-- | tests/tatan.c | 4 | ||||
-rw-r--r-- | tests/tconst_log2.c | 2 | ||||
-rw-r--r-- | tests/tconst_pi.c | 2 | ||||
-rw-r--r-- | tests/tcos.c | 4 | ||||
-rw-r--r-- | tests/tdiv.c | 12 | ||||
-rw-r--r-- | tests/terf.c | 4 | ||||
-rw-r--r-- | tests/texp.c | 8 | ||||
-rw-r--r-- | tests/tget_str.c | 2 | ||||
-rw-r--r-- | tests/tgmpop.c | 16 | ||||
-rw-r--r-- | tests/tlog.c | 4 | ||||
-rw-r--r-- | tests/tmul.c | 12 | ||||
-rw-r--r-- | tests/tmul_2exp.c | 4 | ||||
-rw-r--r-- | tests/tpow_z.c | 4 | ||||
-rw-r--r-- | tests/tset_si.c | 4 | ||||
-rw-r--r-- | tests/tset_sj.c | 4 | ||||
-rw-r--r-- | tests/tsi_op.c | 4 | ||||
-rw-r--r-- | tests/tsin.c | 4 | ||||
-rw-r--r-- | tests/tsin_cos.c | 12 | ||||
-rw-r--r-- | tests/tsqr.c | 4 | ||||
-rw-r--r-- | tests/tsub1sp.c | 8 | ||||
-rw-r--r-- | tests/tsub_ui.c | 8 | ||||
-rw-r--r-- | tests/tsum.c | 8 | ||||
-rw-r--r-- | tests/ttrunc.c | 4 | ||||
-rw-r--r-- | tests/tui_div.c | 4 | ||||
-rw-r--r-- | tests/tui_sub.c | 8 | ||||
-rw-r--r-- | tests/tzeta.c | 4 |
31 files changed, 90 insertions, 90 deletions
diff --git a/tests/tabs.c b/tests/tabs.c index 75e4f914f..a2fcfc0e1 100644 --- a/tests/tabs.c +++ b/tests/tabs.c @@ -83,7 +83,7 @@ check_cmp(int argc, char *argv[]) mpfr_t x, y; int n, k, rnd; - mpfr_inits2(53, x, y, NULL); + mpfr_inits2 (53, x, y, (void *) 0); mpfr_set_ui(x, 1, GMP_RNDN); (mpfr_abs) (x, x, GMP_RNDN); @@ -152,7 +152,7 @@ check_cmp(int argc, char *argv[]) } } - mpfr_clears(x, y, NULL); + mpfr_clears (x, y, (void *) 0); } int diff --git a/tests/tadd.c b/tests/tadd.c index 675bc0a01..7304bf295 100644 --- a/tests/tadd.c +++ b/tests/tadd.c @@ -99,7 +99,7 @@ pcheck (const char *xs, const char *ys, const char *zs, mp_rnd_t rnd_mode, xs, ys, mpfr_print_rnd_mode (rnd_mode)); exit (1); } - mpfr_clears (xx, yy, zz, NULL); + mpfr_clears (xx, yy, zz, (void *) 0); } static void diff --git a/tests/tadd1sp.c b/tests/tadd1sp.c index d7ff9d45a..cf3beb8d5 100644 --- a/tests/tadd1sp.c +++ b/tests/tadd1sp.c @@ -36,7 +36,7 @@ check_overflow (void) set_emin (-1021); set_emax (1024); - mpfr_inits (x, y, z1, z2, NULL); + mpfr_inits (x, y, z1, z2, (void *) 0); mpfr_set_str1 (x, "8.00468257869324898448e+307"); mpfr_set_str1 (y, "7.44784712422708645156e+307"); @@ -47,7 +47,7 @@ check_overflow (void) printf ("Overflow bug in add1sp.\n"); exit (1); } - mpfr_clears (x, y, z1, z2, NULL); + mpfr_clears (x, y, z1, z2, (void *) 0); } int main(void) @@ -103,7 +103,7 @@ void check_random(mp_prec_t p) int r; int i, inexact1, inexact2; - mpfr_inits2(p, a1,b,c,a2, NULL); + mpfr_inits2 (p, a1, b, c, a2, (void *) 0); for (i = 0 ; i < 500 ; i++) { @@ -126,7 +126,7 @@ void check_random(mp_prec_t p) } } - mpfr_clears(a1,a2,b,c,NULL); + mpfr_clears (a1, a2, b, c, (void *) 0); } void check_special(void) @@ -136,7 +136,7 @@ void check_special(void) mpfr_prec_t p; int i = -1, inexact1, inexact2; - mpfr_inits(a1,a2,b,c,NULL); + mpfr_inits (a1, a2, b, c, (void *) 0); for (r = 0 ; r < GMP_RND_MAX ; r++) { @@ -172,5 +172,5 @@ void check_special(void) exit (1); } - mpfr_clears(a1,a2,b,c,NULL); + mpfr_clears (a1, a2, b, c, (void *) 0); } diff --git a/tests/tadd_ui.c b/tests/tadd_ui.c index 03643c883..b2fdbe3b7 100644 --- a/tests/tadd_ui.c +++ b/tests/tadd_ui.c @@ -32,7 +32,7 @@ check3 (const char *xs, unsigned long y, mp_rnd_t rnd_mode, const char *zs) { mpfr_t xx, zz; - mpfr_inits2 (53, xx, zz, NULL); + mpfr_inits2 (53, xx, zz, (void *) 0); mpfr_set_str1 (xx, xs); mpfr_add_ui (zz, xx, y, rnd_mode); if (mpfr_cmp_str1(zz, zs) ) @@ -43,7 +43,7 @@ check3 (const char *xs, unsigned long y, mp_rnd_t rnd_mode, const char *zs) xs, y, mpfr_print_rnd_mode(rnd_mode)); exit (1); } - mpfr_clears (xx, zz, NULL); + mpfr_clears (xx, zz, (void *) 0); } static void diff --git a/tests/tagm.c b/tests/tagm.c index bd925cfb6..61f916e9c 100644 --- a/tests/tagm.c +++ b/tests/tagm.c @@ -32,7 +32,7 @@ check4 (const char *as, const char *bs, mp_rnd_t rnd_mode, const char *res) { mpfr_t ta, tb, tres; - mpfr_inits2(53, ta, tb, tres, NULL); + mpfr_inits2 (53, ta, tb, tres, (void *) 0); mpfr_set_str1 (ta, as); mpfr_set_str1 (tb, bs); @@ -47,7 +47,7 @@ check4 (const char *as, const char *bs, mp_rnd_t rnd_mode, const char *res) putchar('\n'); exit (1); } - mpfr_clears (ta, tb, tres, NULL); + mpfr_clears (ta, tb, tres, (void *) 0); } static void diff --git a/tests/tatan.c b/tests/tatan.c index b6c9653b3..0bdc87d58 100644 --- a/tests/tatan.c +++ b/tests/tatan.c @@ -248,7 +248,7 @@ special_atan2 (void) { mpfr_t x, y, z; - mpfr_inits2 (4, x, y, z, NULL); + mpfr_inits2 (4, x, y, z, (void *) 0); /* Anything with NAN should be set to NAN */ mpfr_set_ui (y, 0, GMP_RNDN); @@ -349,7 +349,7 @@ special_atan2 (void) mpfr_atan2 (z, y, x, GMP_RNDN); MPFR_ASSERTN (mpfr_cmp_str (z, "-2.356194490192344928", 10, GMP_RNDN) == 0); - mpfr_clears (x, y, z, NULL); + mpfr_clears (x, y, z, (void *) 0); } int diff --git a/tests/tconst_log2.c b/tests/tconst_log2.c index 7a1bd8c2d..6fff5fbb9 100644 --- a/tests/tconst_log2.c +++ b/tests/tconst_log2.c @@ -86,7 +86,7 @@ check_large (void) mpfr_set_prec (x, 26249); mpfr_const_log2 (x, GMP_RNDZ); - mpfr_clears (x, y, NULL); + mpfr_clears (x, y, (void *) 0); } static void diff --git a/tests/tconst_pi.c b/tests/tconst_pi.c index 5c33febd3..e6d5cb8eb 100644 --- a/tests/tconst_pi.c +++ b/tests/tconst_pi.c @@ -57,7 +57,7 @@ check_large (void) mpfr_const_pi (x, GMP_RNDZ); } - mpfr_clears (x, y, z, NULL); + mpfr_clears (x, y, z, (void *) 0); } int diff --git a/tests/tcos.c b/tests/tcos.c index f485f37a1..795e8ebcc 100644 --- a/tests/tcos.c +++ b/tests/tcos.c @@ -53,7 +53,7 @@ check53 (const char *xs, const char *cos_xs, mp_rnd_t rnd_mode) { mpfr_t xx, c; - mpfr_inits2 (53, xx, c, NULL); + mpfr_inits2 (53, xx, c, (void *) 0); mpfr_set_str1 (xx, xs); /* should be exact */ test_cos (c, xx, rnd_mode); if (mpfr_cmp_str1 (c, cos_xs)) @@ -65,7 +65,7 @@ check53 (const char *xs, const char *cos_xs, mp_rnd_t rnd_mode) printf(", expected %s\n", cos_xs); exit (1); } - mpfr_clears (xx, c, NULL); + mpfr_clears (xx, c, (void *) 0); } #define TEST_FUNCTION test_cos diff --git a/tests/tdiv.c b/tests/tdiv.c index 03b4c2f5b..428fa95cb 100644 --- a/tests/tdiv.c +++ b/tests/tdiv.c @@ -71,7 +71,7 @@ check4 (const char *Ns, const char *Ds, mp_rnd_t rnd_mode, int p, { mpfr_t q, n, d; - mpfr_inits2 (p, q, n, d, NULL); + mpfr_inits2 (p, q, n, d, (void *) 0); mpfr_set_str1 (n, Ns); mpfr_set_str1 (d, Ds); test_div(q, n, d, rnd_mode); @@ -85,7 +85,7 @@ check4 (const char *Ns, const char *Ds, mp_rnd_t rnd_mode, int p, putchar('\n'); exit (1); } - mpfr_clears (q, n, d, NULL); + mpfr_clears (q, n, d, (void *) 0); } static void @@ -93,7 +93,7 @@ check24 (const char *Ns, const char *Ds, mp_rnd_t rnd_mode, const char *Qs) { mpfr_t q, n, d; - mpfr_inits2(24, q, n, d, NULL); + mpfr_inits2 (24, q, n, d, (void *) 0); mpfr_set_str1 (n, Ns); mpfr_set_str1 (d, Ds); @@ -106,7 +106,7 @@ check24 (const char *Ns, const char *Ds, mp_rnd_t rnd_mode, const char *Qs) mpfr_out_str(stdout,10,0,q, GMP_RNDN); putchar('\n'); exit (1); } - mpfr_clears(q,n,d,NULL); + mpfr_clears (q, n, d, (void *) 0); } /* the following examples come from the paper "Number-theoretic Test @@ -196,7 +196,7 @@ check_64(void) { mpfr_t x,y,z; - mpfr_inits2 (64, x, y, z, NULL); + mpfr_inits2 (64, x, y, z, (void *) 0); mpfr_set_str_binary(x, "1.00100100110110101001010010101111000001011100100101010000000000E54"); mpfr_set_str_binary(y, "1.00000000000000000000000000000000000000000000000000000000000000E584"); @@ -213,7 +213,7 @@ check_64(void) exit(1); } - mpfr_clears(x, y, z, NULL); + mpfr_clears (x, y, z, (void *) 0); } static void diff --git a/tests/terf.c b/tests/terf.c index 25a0bfd9d..0a9d283e6 100644 --- a/tests/terf.c +++ b/tests/terf.c @@ -364,7 +364,7 @@ special_erfc (void) { mpfr_t x, y; - mpfr_inits (x, y, NULL); + mpfr_inits (x, y, (void *) 0); /* erfc (NaN) = NaN */ mpfr_set_nan (x); @@ -405,7 +405,7 @@ special_erfc (void) exit (1); } - mpfr_clears (x, y, NULL); + mpfr_clears (x, y, (void *) 0); } static void diff --git a/tests/texp.c b/tests/texp.c index 1e9786500..f5e488369 100644 --- a/tests/texp.c +++ b/tests/texp.c @@ -54,7 +54,7 @@ check3 (const char *op, mp_rnd_t rnd, const char *res) { mpfr_t x, y; - mpfr_inits2 (53, x, y, NULL); + mpfr_inits2 (53, x, y, (void *) 0); /* y negative. If we forget to set the sign in mpfr_exp, we'll see it. */ mpfr_set_si (y, -1, GMP_RNDN); mpfr_set_str1 (x, op); @@ -68,7 +68,7 @@ check3 (const char *op, mp_rnd_t rnd, const char *res) putchar('\n'); exit (1); } - mpfr_clears (x, y, NULL); + mpfr_clears (x, y, (void *) 0); } /* expx is the value of exp(X) rounded towards -infinity */ @@ -77,7 +77,7 @@ check_worst_case (const char *Xs, const char *expxs) { mpfr_t x, y; - mpfr_inits2(53, x, y, NULL); + mpfr_inits2 (53, x, y, (void *) 0); mpfr_set_str1(x, Xs); test_exp(y, x, GMP_RNDD); if (mpfr_cmp_str1 (y, expxs)) @@ -93,7 +93,7 @@ check_worst_case (const char *Xs, const char *expxs) printf ("exp(x) rounded towards +infinity is wrong\n"); exit(1); } - mpfr_clears(x,y,NULL); + mpfr_clears (x, y, (void *) 0); } /* worst cases communicated by Jean-Michel Muller and Vincent Lefevre */ diff --git a/tests/tget_str.c b/tests/tget_str.c index af68a1689..4d4a3d6c5 100644 --- a/tests/tget_str.c +++ b/tests/tget_str.c @@ -1051,7 +1051,7 @@ check_bug_base2k (void) exit (1); } mpfr_free_str (s); - mpfr_clears (xx, yy, zz, (void *) NULL); + mpfr_clears (xx, yy, zz, (void *) 0); } #define ITER 1000 diff --git a/tests/tgmpop.c b/tests/tgmpop.c index 662a97e71..98f12a623 100644 --- a/tests/tgmpop.c +++ b/tests/tgmpop.c @@ -323,7 +323,7 @@ test_specialz (int (*mpfr_func)(mpfr_ptr, mpfr_srcptr, mpz_srcptr, mp_rnd_t), mpz_t z1, z2; int res; - mpfr_inits2 (128, x1, x2, NULL); + mpfr_inits2 (128, x1, x2, (void *) 0); mpz_init (z1); mpz_init(z2); mpz_fac_ui (z1, 19); /* 19!+1 fits perfectly in a 128 bits mantissa */ mpz_add_ui (z1, z1, 1); @@ -386,7 +386,7 @@ test_specialz (int (*mpfr_func)(mpfr_ptr, mpfr_srcptr, mpz_srcptr, mp_rnd_t), } mpz_clear (z1); mpz_clear(z2); - mpfr_clears(x1, x2, NULL); + mpfr_clears (x1, x2, (void *) 0); } static void @@ -401,7 +401,7 @@ test_genericz (mp_prec_t p0, mp_prec_t p1, unsigned int N, int inexact, compare, compare2; unsigned int n; - mpfr_inits (arg1, dst_big, dst_small, tmp, NULL); + mpfr_inits (arg1, dst_big, dst_small, tmp, (void *) 0); mpz_init (arg2); for (prec = p0; prec <= p1; prec++) @@ -463,7 +463,7 @@ test_genericz (mp_prec_t p0, mp_prec_t p1, unsigned int N, } mpz_clear (arg2); - mpfr_clears (arg1, dst_big, dst_small, tmp, NULL); + mpfr_clears (arg1, dst_big, dst_small, tmp, (void *) 0); } static void @@ -478,7 +478,7 @@ test_genericq (mp_prec_t p0, mp_prec_t p1, unsigned int N, int inexact, compare, compare2; unsigned int n; - mpfr_inits (arg1, dst_big, dst_small, tmp, NULL); + mpfr_inits (arg1, dst_big, dst_small, tmp, (void *) 0); mpq_init (arg2); for (prec = p0; prec <= p1; prec++) @@ -543,7 +543,7 @@ test_genericq (mp_prec_t p0, mp_prec_t p1, unsigned int N, } mpq_clear (arg2); - mpfr_clears (arg1, dst_big, dst_small, tmp, NULL); + mpfr_clears (arg1, dst_big, dst_small, tmp, (void *) 0); } static void @@ -559,7 +559,7 @@ test_specialq (mp_prec_t p0, mp_prec_t p1, unsigned int N, for (prec = p0 ; prec < p1 ; prec++) { - mpfr_inits2 (prec, fra, frb, frq, NULL); + mpfr_inits2 (prec, fra, frb, frq, (void *) 0); mpq_init (q1); mpq_init(q2); mpq_init (qr); for( n = 0 ; n < N ; n++) @@ -589,7 +589,7 @@ test_specialq (mp_prec_t p0, mp_prec_t p1, unsigned int N, } mpq_clear (q1); mpq_clear (q2); mpq_clear (qr); - mpfr_clears (fra, frb, frq, NULL); + mpfr_clears (fra, frb, frq, (void *) 0); } } diff --git a/tests/tlog.c b/tests/tlog.c index 384bfdb6f..4d3329eb0 100644 --- a/tests/tlog.c +++ b/tests/tlog.c @@ -53,7 +53,7 @@ check2 (const char *as, mp_rnd_t rnd_mode, const char *res1s) { mpfr_t ta, tres; - mpfr_inits2 (53, ta, tres, NULL); + mpfr_inits2 (53, ta, tres, (void *) 0); mpfr_set_str1 (ta, as); test_log (tres, ta, rnd_mode); @@ -66,7 +66,7 @@ check2 (const char *as, mp_rnd_t rnd_mode, const char *res1s) mpfr_out_str(stdout, 10, 0, tres, GMP_RNDN); exit (1); } - mpfr_clears (ta, tres, NULL); + mpfr_clears (ta, tres, (void *) 0); } static void diff --git a/tests/tmul.c b/tests/tmul.c index 8913a7aa7..3b1440af4 100644 --- a/tests/tmul.c +++ b/tests/tmul.c @@ -93,7 +93,7 @@ check53 (const char *xs, const char *ys, mp_rnd_t rnd_mode, const char *zs) { mpfr_t xx, yy, zz; - mpfr_inits2 (53, xx, yy, zz, NULL); + mpfr_inits2 (53, xx, yy, zz, (void *) 0); mpfr_set_str1 (xx, xs); mpfr_set_str1 (yy, ys); test_mul (zz, xx, yy, rnd_mode); @@ -116,7 +116,7 @@ check53 (const char *xs, const char *ys, mp_rnd_t rnd_mode, const char *zs) putchar('\n'); */ exit (1); } - mpfr_clears (xx, yy, zz, NULL); + mpfr_clears (xx, yy, zz, (void *) 0); } /* checks that x*y gives the right result with 24 bits of precision */ @@ -125,7 +125,7 @@ check24 (const char *xs, const char *ys, mp_rnd_t rnd_mode, const char *zs) { mpfr_t xx, yy, zz; - mpfr_inits2 (24, xx, yy, zz, NULL); + mpfr_inits2 (24, xx, yy, zz, (void *) 0); mpfr_set_str1 (xx, xs); mpfr_set_str1 (yy, ys); test_mul (zz, xx, yy, rnd_mode); @@ -138,7 +138,7 @@ check24 (const char *xs, const char *ys, mp_rnd_t rnd_mode, const char *zs) putchar('\n'); exit (1); } - mpfr_clears(xx, yy, zz, NULL); + mpfr_clears (xx, yy, zz, (void *) 0); } /* the following examples come from the paper "Number-theoretic Test @@ -447,7 +447,7 @@ check_regression (void) mpfr_t x, y, z; int i; - mpfr_inits2 (6177, x, y, z, NULL); + mpfr_inits2 (6177, x, y, z, (void *) 0); mpfr_set_str (y, "5.17cc1b727220a94fe13abe8fa9a6ee06db14acc9e21c820ff28b1d5ef5de2b0db92371d212" @@ -633,7 +633,7 @@ check_regression (void) exit (1); } - mpfr_clears (x, y, z, NULL); + mpfr_clears (x, y, z, (void *) 0); } #define TEST_FUNCTION test_mul diff --git a/tests/tmul_2exp.c b/tests/tmul_2exp.c index 7ba814fed..48302be92 100644 --- a/tests/tmul_2exp.c +++ b/tests/tmul_2exp.c @@ -54,7 +54,7 @@ main (int argc, char *argv[]) tests_start_mpfr (); - mpfr_inits2 (53, w, z, NULL); + mpfr_inits2 (53, w, z, (void *) 0); for (i = 0; i < 3; i++) { @@ -132,7 +132,7 @@ main (int argc, char *argv[]) } } - mpfr_clears (w, z, NULL); + mpfr_clears (w, z, (void *) 0); tests_end_mpfr (); return 0; diff --git a/tests/tpow_z.c b/tests/tpow_z.c index f342024a5..8326d900c 100644 --- a/tests/tpow_z.c +++ b/tests/tpow_z.c @@ -147,7 +147,7 @@ check_integer (mp_prec_t begin, mp_prec_t end, unsigned long max) int res1, res2; mp_rnd_t rnd; - mpfr_inits2 (begin, x, y1, y2, NULL); + mpfr_inits2 (begin, x, y1, y2, (void *) 0); mpz_init (z); for (p = begin ; p < end ; p+=4) { @@ -188,7 +188,7 @@ check_integer (mp_prec_t begin, mp_prec_t end, unsigned long max) } } /* for i */ } /* for p */ - mpfr_clears (x, y1, y2, NULL); + mpfr_clears (x, y1, y2, (void *) 0); mpz_clear (z); } diff --git a/tests/tset_si.c b/tests/tset_si.c index 2ab50e6af..8113e5964 100644 --- a/tests/tset_si.c +++ b/tests/tset_si.c @@ -101,7 +101,7 @@ test_macros (void) mpfr_ptr p; mpfr_rnd_t r; - mpfr_inits (x[0], x[1], x[2], NULL); + mpfr_inits (x[0], x[1], x[2], (void *) 0); p = x[0]; r = 0; mpfr_set_ui (p++, 0, r++); @@ -120,7 +120,7 @@ test_macros (void) "r = %d (expecting 1)\n", (int) (p - x[0]), r); exit (1); } - mpfr_clears (x[0], x[1], x[2], NULL); + mpfr_clears (x[0], x[1], x[2], (void *) 0); } /* FIXME: Comparing against mpfr_get_si/ui is not ideal, it'd be better to diff --git a/tests/tset_sj.c b/tests/tset_sj.c index 10a2dc943..2d1eec6ce 100644 --- a/tests/tset_sj.c +++ b/tests/tset_sj.c @@ -65,7 +65,7 @@ check_set_uj (mp_prec_t pmin, mp_prec_t pmax, int N) int inex1, inex2, n; mp_limb_t limb; - mpfr_inits2 (pmax, x, y, NULL); + mpfr_inits2 (pmax, x, y, (void *) 0); for ( p = pmin ; p < pmax ; p++) { @@ -107,7 +107,7 @@ check_set_uj (mp_prec_t pmin, mp_prec_t pmax, int N) if (!MPFR_IS_ZERO (x)) ERROR ("Setting 0"); - mpfr_clears (x, y, NULL); + mpfr_clears (x, y, (void *) 0); } static void diff --git a/tests/tsi_op.c b/tests/tsi_op.c index a17e53006..3fbe72e34 100644 --- a/tests/tsi_op.c +++ b/tests/tsi_op.c @@ -103,7 +103,7 @@ main (int argc, char *argv[]) MPFR_TEST_USE_RANDS (); tests_start_mpfr (); - mpfr_inits2 (53, x, z, NULL); + mpfr_inits2 (53, x, z, (void *) 0); for(i = 0 ; i < numberof (tab) ; i++) { mpfr_set_str (x, tab[i].op1, 16, GMP_RNDN); @@ -133,7 +133,7 @@ main (int argc, char *argv[]) if (mpfr_cmp_str1 (z, "-1024")) ERROR1("si_div", i, z, "-1024"); - mpfr_clears (x, z, NULL); + mpfr_clears (x, z, (void *) 0); check_invert (); diff --git a/tests/tsin.c b/tests/tsin.c index e7a80e154..760f4b904 100644 --- a/tests/tsin.c +++ b/tests/tsin.c @@ -210,7 +210,7 @@ check_regression () int i; p = strlen (xs) - 2 - 3; - mpfr_inits2 (p, x, y, NULL); + mpfr_inits2 (p, x, y, (void *) 0); mpfr_set_str (x, xs, 2, GMP_RNDN); i = mpfr_sin (y, x, GMP_RNDN); @@ -222,7 +222,7 @@ check_regression () mpfr_dump (y); exit (1); } - mpfr_clears (x, y, NULL); + mpfr_clears (x, y, (void *) 0); } /* Test provided by Christopher Creutzig, 2007-05-21. */ diff --git a/tests/tsin_cos.c b/tests/tsin_cos.c index 3430766e8..db7e6493e 100644 --- a/tests/tsin_cos.c +++ b/tests/tsin_cos.c @@ -50,7 +50,7 @@ check53 (const char *xs, const char *sin_xs, const char *cos_xs, { mpfr_t xx, s, c; - mpfr_inits2 (53, xx, s, c, NULL); + mpfr_inits2 (53, xx, s, c, (void *) 0); mpfr_set_str1 (xx, xs); /* should be exact */ mpfr_sin_cos (s, c, xx, rnd_mode); if (mpfr_cmp_str1 (s, sin_xs)) @@ -71,7 +71,7 @@ check53 (const char *xs, const char *sin_xs, const char *cos_xs, printf(", expected %s\n", cos_xs); exit (1); } - mpfr_clears (xx, s, c, NULL); + mpfr_clears (xx, s, c, (void *) 0); } static void @@ -79,7 +79,7 @@ check53sin (const char *xs, const char *sin_xs, mp_rnd_t rnd_mode) { mpfr_t xx, s, c; - mpfr_inits2 (53, xx, s, c, NULL); + mpfr_inits2 (53, xx, s, c, (void *) 0); mpfr_set_str1 (xx, xs); /* should be exact */ mpfr_sin_cos (s, c, xx, rnd_mode); if (mpfr_cmp_str1 (s, sin_xs)) @@ -91,7 +91,7 @@ check53sin (const char *xs, const char *sin_xs, mp_rnd_t rnd_mode) printf(", expected %s\n", sin_xs); exit (1); } - mpfr_clears (xx, s, c, NULL); + mpfr_clears (xx, s, c, (void *) 0); } static void @@ -99,7 +99,7 @@ check53cos (const char *xs, const char *cos_xs, mp_rnd_t rnd_mode) { mpfr_t xx, c, s; - mpfr_inits2 (53, xx, s, c, NULL); + mpfr_inits2 (53, xx, s, c, (void *) 0); mpfr_set_str1 (xx, xs); /* should be exact */ mpfr_sin_cos (s, c, xx, rnd_mode); if (mpfr_cmp_str1 (c, cos_xs)) @@ -111,7 +111,7 @@ check53cos (const char *xs, const char *cos_xs, mp_rnd_t rnd_mode) printf(", expected %s\n", cos_xs); exit (1); } - mpfr_clears (xx, s, c, NULL); + mpfr_clears (xx, s, c, (void *) 0); } static void diff --git a/tests/tsqr.c b/tests/tsqr.c index 7a50f9d2d..2850c01f3 100644 --- a/tests/tsqr.c +++ b/tests/tsqr.c @@ -76,7 +76,7 @@ void check_random(mpfr_prec_t p) int r; int i, inexact1, inexact2; - mpfr_inits2(p, x, y, z, NULL); + mpfr_inits2 (p, x, y, z, (void *) 0); for(i = 0 ; i < 500 ; i++) { mpfr_random (x); @@ -91,7 +91,7 @@ void check_random(mpfr_prec_t p) error2 ((mp_rnd_t) r,p,x,y,inexact1,inexact2); } } - mpfr_clears(x,y,z,NULL); + mpfr_clears (x, y, z, (void *) 0); } void check_special(void) diff --git a/tests/tsub1sp.c b/tests/tsub1sp.c index 2b1578773..e173f8bd9 100644 --- a/tests/tsub1sp.c +++ b/tests/tsub1sp.c @@ -72,7 +72,7 @@ void check_random(mpfr_prec_t p) int r; int i, inexact1, inexact2; - mpfr_inits2(p, x,y,z,x2,NULL); + mpfr_inits2 (p, x, y, z, x2, (void *) 0); for (i = 0 ; i < 500 ; i++) { @@ -90,7 +90,7 @@ void check_random(mpfr_prec_t p) } } - mpfr_clears(x,y,z,x2,NULL); + mpfr_clears (x, y, z, x2, (void *) 0); } void check_special(void) @@ -101,7 +101,7 @@ void check_special(void) int i = -1, inexact1, inexact2; mp_exp_t es; - mpfr_inits(x,y,z,x2,NULL); + mpfr_inits (x, y, z, x2, (void *) 0); for (r = 0 ; r < GMP_RND_MAX ; r++) { @@ -502,5 +502,5 @@ void check_special(void) set_emin (es); } - mpfr_clears(x,y,z,x2,NULL); + mpfr_clears (x, y, z, x2, (void *) 0); } diff --git a/tests/tsub_ui.c b/tests/tsub_ui.c index 38294d693..14cba1eb3 100644 --- a/tests/tsub_ui.c +++ b/tests/tsub_ui.c @@ -32,7 +32,7 @@ check3 (const char *xs, unsigned long y, mp_rnd_t rnd_mode, const char *zs) { mpfr_t xx,zz; - mpfr_inits2 (53, xx, zz, NULL); + mpfr_inits2 (53, xx, zz, (void *) 0); mpfr_set_str1 (xx, xs); mpfr_sub_ui (zz, xx, y, rnd_mode); if (mpfr_cmp_str1(zz, zs)) @@ -43,7 +43,7 @@ check3 (const char *xs, unsigned long y, mp_rnd_t rnd_mode, const char *zs) xs, y, mpfr_print_rnd_mode (rnd_mode)); exit (1); } - mpfr_clears (xx, zz, NULL); + mpfr_clears (xx, zz, (void *) 0); } /* FastTwoSum: if EXP(x) >= EXP(y), u = o(x+y), v = o(u-x), w = o(y-v), @@ -57,7 +57,7 @@ check_two_sum (mp_prec_t p) mp_rnd_t rnd; int inexact; - mpfr_inits2 (p, y, u, v, w, NULL); + mpfr_inits2 (p, y, u, v, w, (void *) 0); do { x = randlimb (); @@ -83,7 +83,7 @@ check_two_sum (mp_prec_t p) printf ("inexact = %d\n", inexact); exit (1); } - mpfr_clears (y, u, v, w, NULL); + mpfr_clears (y, u, v, w, (void *) 0); } static void diff --git a/tests/tsum.c b/tests/tsum.c index 80c9eaa98..545016ffd 100644 --- a/tests/tsum.c +++ b/tests/tsum.c @@ -151,7 +151,7 @@ test_sum (mp_prec_t f, unsigned long n) tab = (mpfr_t *) malloc (n * sizeof(mpfr_t)); for (i = 0; i < n; i++) mpfr_init2 (tab[i], f); - mpfr_inits2 (f, sum, real_sum, real_non_rounded, NULL); + mpfr_inits2 (f, sum, real_sum, real_non_rounded, (void *) 0); /* First Uniform */ for (i = 0; i < n; i++) @@ -193,7 +193,7 @@ test_sum (mp_prec_t f, unsigned long n) /* Clear stuff */ for (i = 0; i < n; i++) mpfr_clear (tab[i]); - mpfr_clears (sum, real_sum, real_non_rounded, NULL); + mpfr_clears (sum, real_sum, real_non_rounded, (void *) 0); free (tab); } @@ -204,7 +204,7 @@ void check_special (void) mpfr_ptr tabp[3]; int i; - mpfr_inits (tab[0], tab[1], tab[2], r, NULL); + mpfr_inits (tab[0], tab[1], tab[2], r, (void *) 0); tabp[0] = tab[0]; tabp[1] = tab[1]; tabp[2] = tab[2]; @@ -277,7 +277,7 @@ void check_special (void) exit (1); } - mpfr_clears (tab[0], tab[1], tab[2], r, NULL); + mpfr_clears (tab[0], tab[1], tab[2], r, (void *) 0); } diff --git a/tests/ttrunc.c b/tests/ttrunc.c index 06dcd1c36..976d23cfb 100644 --- a/tests/ttrunc.c +++ b/tests/ttrunc.c @@ -35,7 +35,7 @@ main (void) tests_start_mpfr (); - mpfr_inits2(SIZEX, x, y, z, t, y2, z2, t2, NULL); + mpfr_inits2 (SIZEX, x, y, z, t, y2, z2, t2, (void *) 0); mpfr_set_str1 (x, "0.5"); mpfr_ceil(y, x); @@ -126,7 +126,7 @@ main (void) } } - mpfr_clears(x, y, z, t, y2, z2, t2, NULL); + mpfr_clears (x, y, z, t, y2, z2, t2, (void *) 0); tests_end_mpfr (); return 0; diff --git a/tests/tui_div.c b/tests/tui_div.c index d1e2f3c7d..4adf26f8c 100644 --- a/tests/tui_div.c +++ b/tests/tui_div.c @@ -31,7 +31,7 @@ check (unsigned long y, const char *xs, mp_rnd_t rnd_mode, const char *zs) { mpfr_t xx, zz; - mpfr_inits2 (53, xx, zz, NULL); + mpfr_inits2 (53, xx, zz, (void *) 0); mpfr_set_str1 (xx, xs); mpfr_ui_div (zz, y, xx, rnd_mode); if (mpfr_cmp_str1(zz, zs)) @@ -42,7 +42,7 @@ check (unsigned long y, const char *xs, mp_rnd_t rnd_mode, const char *zs) y, xs, mpfr_print_rnd_mode (rnd_mode)); exit (1); } - mpfr_clears (xx, zz, NULL); + mpfr_clears (xx, zz, (void *) 0); } static void diff --git a/tests/tui_sub.c b/tests/tui_sub.c index d5a634584..c48fa5c55 100644 --- a/tests/tui_sub.c +++ b/tests/tui_sub.c @@ -147,7 +147,7 @@ check (unsigned long y, const char *xs, mp_rnd_t rnd_mode, const char *zs) { mpfr_t xx, zz; - mpfr_inits2 (53, xx, zz, NULL); + mpfr_inits2 (53, xx, zz, (void *) 0); mpfr_set_str1 (xx, xs); mpfr_ui_sub (zz, y, xx, rnd_mode); if (mpfr_cmp_str1 (zz, zs) ) @@ -158,7 +158,7 @@ check (unsigned long y, const char *xs, mp_rnd_t rnd_mode, const char *zs) y, xs, mpfr_print_rnd_mode (rnd_mode)); exit (1); } - mpfr_clears (xx, zz, NULL); + mpfr_clears (xx, zz, (void *) 0); } /* if u = o(x-y), v = o(u-x), w = o(v+y), then x-y = u-w */ @@ -170,7 +170,7 @@ check_two_sum (mp_prec_t p) mp_rnd_t rnd; int inexact; - mpfr_inits2 (p, y, u, v, w, NULL); + mpfr_inits2 (p, y, u, v, w, (void *) 0); do { x = randlimb (); @@ -196,7 +196,7 @@ check_two_sum (mp_prec_t p) printf ("inexact = %d\n", inexact); exit (1); } - mpfr_clears (y, u, v, w, NULL); + mpfr_clears (y, u, v, w, (void *) 0); } static void diff --git a/tests/tzeta.c b/tests/tzeta.c index 5a80b99c0..b72bc1d14 100644 --- a/tests/tzeta.c +++ b/tests/tzeta.c @@ -162,7 +162,7 @@ test2(void) mpfr_t x, y; int i, n = numberof(val); - mpfr_inits2 (55, x, y, NULL); + mpfr_inits2 (55, x, y, (void *) 0); for(i = 0 ; i < n ; i+=2) { @@ -184,7 +184,7 @@ test2(void) exit(1); } } - mpfr_clears(x, y, NULL); + mpfr_clears (x, y, (void *) 0); } #define TEST_FUNCTION mpfr_zeta |