summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2022-04-18 09:09:50 +0200
committerNiels Möller <nisse@lysator.liu.se>2022-04-18 09:09:50 +0200
commitd5140b0ec81a64f53f5c3f223fdf215b324675eb (patch)
treef9c9b4c762b25394410f484554e97fe78e3be270
parent6f8a633b534b9e2662abfa3ede7cf84da84d21a7 (diff)
downloadgmp-d5140b0ec81a64f53f5c3f223fdf215b324675eb.tar.gz
mini-gmp/mini-gmp.c (gmp_assert_nocarry): Avoid warning about unused variable.
-rw-r--r--mini-gmp/ChangeLog5
-rw-r--r--mini-gmp/mini-gmp.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/mini-gmp/ChangeLog b/mini-gmp/ChangeLog
index b3039e21e..fc91608bd 100644
--- a/mini-gmp/ChangeLog
+++ b/mini-gmp/ChangeLog
@@ -1,3 +1,8 @@
+2022-04-18 Niels Möller <nisse@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@mail.dm.unipi.it>
* mini-mpq.c (mpq_helper_canonicalize): Remove tmp parameter.
diff --git a/mini-gmp/mini-gmp.c b/mini-gmp/mini-gmp.c
index 2b1ddee07..95f067f82 100644
--- a/mini-gmp/mini-gmp.c
+++ b/mini-gmp/mini-gmp.c
@@ -90,6 +90,7 @@ see https://www.gnu.org/licenses/. */
#define gmp_assert_nocarry(x) do { \
mp_limb_t __cy = (x); \
assert (__cy == 0); \
+ (void) (__cy); \
} while (0)
#define gmp_clz(count, x) do { \