[Gmp-commit] /var/hg/gmp: Silence some other warnings...

mercurial at gmplib.org mercurial at gmplib.org
Fri Oct 16 06:13:04 UTC 2015


details:   /var/hg/gmp/rev/90fbf2de755e
changeset: 16881:90fbf2de755e
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Oct 16 08:12:49 2015 +0200
description:
Silence some other warnings...

diffstat:

 mpn/generic/div_qr_2.c   |  2 +-
 mpn/generic/toom43_mul.c |  2 +-
 mpn/generic/toom44_mul.c |  4 ++--
 mpn/generic/toom52_mul.c |  2 +-
 tests/mpn/t-minvert.c    |  2 --
 tests/mpz/t-cong_2exp.c  |  1 -
 6 files changed, 5 insertions(+), 8 deletions(-)

diffs (87 lines):

diff -r 65d67387da5b -r 90fbf2de755e mpn/generic/div_qr_2.c
--- a/mpn/generic/div_qr_2.c	Fri Oct 16 08:03:46 2015 +0200
+++ b/mpn/generic/div_qr_2.c	Fri Oct 16 08:12:49 2015 +0200
@@ -152,7 +152,7 @@
 									\
     sub_ddmmss (r1, r0, n1, n0, _t1, _t0);				\
 									\
-    _mask = -(mp_limb_t) ((r1 >= _q1) & (r1 > _q1 | r0 >= _q0));  /* (r1,r0) >= (q1,q0) */  \
+    _mask = -(mp_limb_t) ((r1 >= _q1) & ((r1 > _q1) | (r0 >= _q0)));  /* (r1,r0) >= (q1,q0) */  \
     add_ssaaaa (r1, r0, r1, r0, d1 & _mask, d0 & _mask);		\
     sub_ddmmss (_q3, _q2, _q3, _q2, CNST_LIMB(0), -_mask);		\
 									\
diff -r 65d67387da5b -r 90fbf2de755e mpn/generic/toom43_mul.c
--- a/mpn/generic/toom43_mul.c	Fri Oct 16 08:03:46 2015 +0200
+++ b/mpn/generic/toom43_mul.c	Fri Oct 16 08:12:49 2015 +0200
@@ -146,7 +146,7 @@
 #endif
 
   /* Compute as1 and asm1.  */
-  flags = (enum toom6_flags) (flags ^ toom6_vm1_neg & mpn_toom_eval_dgr3_pm1 (as1, asm1, ap, n, s, a0a2));
+  flags = (enum toom6_flags) (flags ^ (toom6_vm1_neg & mpn_toom_eval_dgr3_pm1 (as1, asm1, ap, n, s, a0a2)));
 
   /* Compute bs1 and bsm1.  */
   bsm1[n] = mpn_add (bsm1, b0, n, b2, t);
diff -r 65d67387da5b -r 90fbf2de755e mpn/generic/toom44_mul.c
--- a/mpn/generic/toom44_mul.c	Fri Oct 16 08:03:46 2015 +0200
+++ b/mpn/generic/toom44_mul.c	Fri Oct 16 08:12:49 2015 +0200
@@ -162,7 +162,7 @@
   flags = (enum toom7_flags) (toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (apx, amx, ap, n, s, tp));
 
   /* Compute bpx = b0 + 2 b1 + 4 b2 + 8 b3 and bmx = b0 - 2 b1 + 4 b2 - 8 b3.  */
-  flags = (enum toom7_flags) (flags ^ toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (bpx, bmx, bp, n, t, tp));
+  flags = (enum toom7_flags) (flags ^ (toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (bpx, bmx, bp, n, t, tp)));
 
   TOOM44_MUL_N_REC (v2, apx, bpx, n + 1, tp);	/* v2,  2n+1 limbs */
   TOOM44_MUL_N_REC (vm2, amx, bmx, n + 1, tp);	/* vm2,  2n+1 limbs */
@@ -220,7 +220,7 @@
   flags = (enum toom7_flags) (flags | (toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp)));
 
   /* Compute bpx = b0 + b1 + b2 + b3 and bmx = b0 - b1 + b2 - b3.  */
-  flags = (enum toom7_flags) (flags ^ toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (bpx, bmx, bp, n, t, tp));
+  flags = (enum toom7_flags) (flags ^ (toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (bpx, bmx, bp, n, t, tp)));
 
   TOOM44_MUL_N_REC (vm1, amx, bmx, n + 1, tp);	/* vm1,  2n+1 limbs */
   /* Clobbers amx, bmx. */
diff -r 65d67387da5b -r 90fbf2de755e mpn/generic/toom52_mul.c
--- a/mpn/generic/toom52_mul.c	Fri Oct 16 08:03:46 2015 +0200
+++ b/mpn/generic/toom52_mul.c	Fri Oct 16 08:12:49 2015 +0200
@@ -197,7 +197,7 @@
     }
 
   /* Compute as1 and asm1.  */
-  flags = (enum toom6_flags) (flags ^ toom6_vm1_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, a0a2));
+  flags = (enum toom6_flags) (flags ^ (toom6_vm1_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, a0a2)));
 
   ASSERT (as1[n] <= 4);
   ASSERT (bs1[n] <= 1);
diff -r 65d67387da5b -r 90fbf2de755e tests/mpn/t-minvert.c
--- a/tests/mpn/t-minvert.c	Fri Oct 16 08:03:46 2015 +0200
+++ b/tests/mpn/t-minvert.c	Fri Oct 16 08:12:49 2015 +0200
@@ -60,7 +60,6 @@
   long count = COUNT;
   mp_ptr mp;
   mp_ptr ap;
-  mp_ptr vp;
   mp_ptr tp;
   mp_ptr scratch;
   mpz_t m, a, r, g;
@@ -92,7 +91,6 @@
 
   mp = TMP_ALLOC_LIMBS (MAX_SIZE);
   ap = TMP_ALLOC_LIMBS (MAX_SIZE);
-  vp = TMP_ALLOC_LIMBS (MAX_SIZE);
   tp = TMP_ALLOC_LIMBS (MAX_SIZE);
   scratch = TMP_ALLOC_LIMBS (mpn_sec_invert_itch (MAX_SIZE) + 1);
 
diff -r 65d67387da5b -r 90fbf2de755e tests/mpz/t-cong_2exp.c
--- a/tests/mpz/t-cong_2exp.c	Fri Oct 16 08:03:46 2015 +0200
+++ b/tests/mpz/t-cong_2exp.c	Fri Oct 16 08:12:49 2015 +0200
@@ -157,7 +157,6 @@
 void
 check_random_bits (int reps)
 {
-  gmp_randstate_ptr rands = RANDS;
   mp_bitcnt_t ea, ec, en, d;
   mp_bitcnt_t m = 10 * GMP_LIMB_BITS;
   mpz_t  a, c;


More information about the gmp-commit mailing list