[Gmp-commit] /var/hg/gmp: 4 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sun Dec 13 18:12:39 UTC 2020
details: /var/hg/gmp/rev/1bf29acbdd94
changeset: 18176:1bf29acbdd94
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Dec 13 19:09:15 2020 +0100
description:
Makefile.am: Update -version-info table
details: /var/hg/gmp/rev/89cc0d5a2695
changeset: 18177:89cc0d5a2695
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Dec 13 19:11:02 2020 +0100
description:
mpn/generic/mod_1_3.c: Use default in a switch (reduce warnings)
details: /var/hg/gmp/rev/e8fa6bb4d836
changeset: 18178:e8fa6bb4d836
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Dec 13 19:11:37 2020 +0100
description:
scanf/doscan.c: Mask ASSERT_CODE
details: /var/hg/gmp/rev/03055b2083e4
changeset: 18179:03055b2083e4
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Dec 13 19:12:05 2020 +0100
description:
mpn/generic/mu_divappr_q.c: Remove unused exit condition
diffstat:
Makefile.am | 1 +
mpn/generic/mod_1_3.c | 5 ++---
mpn/generic/mu_divappr_q.c | 4 ++--
scanf/doscan.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r d610a42e8ba4 -r 03055b2083e4 Makefile.am
--- a/Makefile.am Sat Dec 12 12:21:52 2020 +0100
+++ b/Makefile.am Sun Dec 13 19:12:05 2020 +0100
@@ -90,6 +90,7 @@
# 6.1.1 13:1:3 9:1:5 -
# 6.1.2 13:2:3 9:2:5 -
# 6.2.0 14:0:4 10:0:6 -
+# 6.2.1 14:1:4 10:1:6 -
#
# Starting at 3:0:0 is a slight abuse of the versioning system, but it
# ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux
diff -r d610a42e8ba4 -r 03055b2083e4 mpn/generic/mod_1_3.c
--- a/mpn/generic/mod_1_3.c Sat Dec 12 12:21:52 2020 +0100
+++ b/mpn/generic/mod_1_3.c Sun Dec 13 19:12:05 2020 +0100
@@ -110,10 +110,9 @@
add_ssaaaa (rh, rl, rh, rl, ph, pl);
n -= 3;
break;
- case 2: /* n mod 3 = 1 */
+ default: /* n mod 3 = 1; (case 2)*/
rh = 0;
- rl = ap[n - 1];
- n -= 1;
+ rl = ap[--n];
break;
case 1: /* n mod 3 = 2 */
rh = ap[n - 1];
diff -r d610a42e8ba4 -r 03055b2083e4 mpn/generic/mu_divappr_q.c
--- a/mpn/generic/mu_divappr_q.c Sat Dec 12 12:21:52 2020 +0100
+++ b/mpn/generic/mu_divappr_q.c Sun Dec 13 19:12:05 2020 +0100
@@ -188,10 +188,10 @@
else
MPN_COPY (rp, np, dn);
- if (qn == 0)
+ if (UNLIKELY (qn == 0))
return qh; /* Degenerate use. Should we allow this? */
- while (qn > 0)
+ for (;;) /* The exit condition (qn == 0) is verified in the loop. */
{
if (qn < in)
{
diff -r d610a42e8ba4 -r 03055b2083e4 scanf/doscan.c
--- a/scanf/doscan.c Sat Dec 12 12:21:52 2020 +0100
+++ b/scanf/doscan.c Sun Dec 13 19:12:05 2020 +0100
@@ -499,7 +499,7 @@
alloc_fmt = __GMP_ALLOCATE_FUNC_TYPE (alloc_fmt_size, char);
fmt = orig_fmt;
- end_fmt = orig_fmt + orig_fmt_len;
+ ASSERT_CODE (end_fmt = orig_fmt + orig_fmt_len);
for (;;)
{
More information about the gmp-commit
mailing list