]> git.eshelyaron.com Git - emacs.git/commitdiff
Update mini-gmp
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Aug 2019 01:11:16 +0000 (18:11 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Aug 2019 01:11:34 +0000 (18:11 -0700)
* src/mini-gmp.c: Sync from upstream.  This incorporates:
2019-08-13 Silence a couple of warnings

src/mini-gmp.c

index 88b71c3f9a606fc8448785405d6c5ed971f4901a..e92e7cf9c72eabef3434ee0be37464a634d7bc83 100644 (file)
@@ -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 */