From 3881542edeac3e94291c2ce574edf0b0e52764a8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 20 Aug 2019 18:11:16 -0700 Subject: [PATCH] Update mini-gmp * src/mini-gmp.c: Sync from upstream. This incorporates: 2019-08-13 Silence a couple of warnings --- src/mini-gmp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mini-gmp.c b/src/mini-gmp.c index 88b71c3f9a6..e92e7cf9c72 100644 --- a/src/mini-gmp.c +++ b/src/mini-gmp.c @@ -2,7 +2,7 @@ Contributed to the GNU project by Niels Möller -Copyright 1991-1997, 1999-2018 Free Software Foundation, Inc. +Copyright 1991-1997, 1999-2019 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -295,7 +295,7 @@ gmp_default_alloc (size_t size) } static void * -gmp_default_realloc (void *old, size_t old_size, size_t new_size) +gmp_default_realloc (void *old, size_t unused_old_size, size_t new_size) { void * p; @@ -308,7 +308,7 @@ gmp_default_realloc (void *old, size_t old_size, size_t new_size) } static void -gmp_default_free (void *p, size_t size) +gmp_default_free (void *p, size_t unused_size) { free (p); } @@ -1595,7 +1595,7 @@ mpz_get_ui (const mpz_t u) int LOCAL_GMP_LIMB_BITS = GMP_LIMB_BITS; unsigned long r = 0; mp_size_t n = GMP_ABS (u->_mp_size); - n = GMP_MIN (n, 1 + (GMP_ULONG_BITS - 1) / GMP_LIMB_BITS); + n = GMP_MIN (n, 1 + (mp_size_t) (GMP_ULONG_BITS - 1) / GMP_LIMB_BITS); while (--n >= 0) r = (r << LOCAL_GMP_LIMB_BITS) + u->_mp_d[n]; return r; @@ -3499,7 +3499,7 @@ gmp_stronglucas (const mpz_t x, mpz_t Qk) b0 = mpz_scan0 (n, 0); /* D= P^2 - 4Q; P = 1; Q = (1-D)/4 */ - Q = (D & 2) ? (D >> 2) + 1 : -(long) (D >> 2); + Q = (D & 2) ? (long) (D >> 2) + 1 : -(long) (D >> 2); if (! gmp_lucas_mod (V, Qk, Q, b0, n)) /* If Ud != 0 */ while (V->_mp_size != 0 && --b0 != 0) /* while Vk != 0 */ -- 2.39.2