[Gmp-commit] /var/hg/gmp: mini-gmp/mini-gmp.c (gmp_assert_nocarry): Avoid war...

mercurial at gmplib.org mercurial at gmplib.org
Mon Apr 18 09:10:26 CEST 2022


details:   /var/hg/gmp/rev/541600d84118
changeset: 18346:541600d84118
user:      Niels Möller <nisse at lysator.liu.se>
date:      Mon Apr 18 09:09:50 2022 +0200
description:
mini-gmp/mini-gmp.c (gmp_assert_nocarry): Avoid warning about unused variable.

diffstat:

 mini-gmp/ChangeLog  |  5 +++++
 mini-gmp/mini-gmp.c |  1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diffs (23 lines):

diff -r 55b05c568ce9 -r 541600d84118 mini-gmp/ChangeLog
--- a/mini-gmp/ChangeLog	Sun Apr 17 09:32:29 2022 +0200
+++ b/mini-gmp/ChangeLog	Mon Apr 18 09:09:50 2022 +0200
@@ -1,3 +1,8 @@
+2022-04-18  Niels Möller  <nisse at lysator.liu.se>
+
+	* mini-gmp.c (gmp_assert_nocarry): Avoid warning about unused
+	variable in NDEBUG builds. Reported by Paul Egggert.
+
 2022-04-17 Marco Bodrato <bodrato at mail.dm.unipi.it>
 	* mini-mpq.c (mpq_helper_canonicalize): Remove tmp parameter.
 
diff -r 55b05c568ce9 -r 541600d84118 mini-gmp/mini-gmp.c
--- a/mini-gmp/mini-gmp.c	Sun Apr 17 09:32:29 2022 +0200
+++ b/mini-gmp/mini-gmp.c	Mon Apr 18 09:09:50 2022 +0200
@@ -90,6 +90,7 @@
 #define gmp_assert_nocarry(x) do { \
     mp_limb_t __cy = (x);	   \
     assert (__cy == 0);		   \
+    (void) (__cy);		   \
   } while (0)
 
 #define gmp_clz(count, x) do {						\


More information about the gmp-commit mailing list