[libmath-prime-util-perl] 71/72: Silence compiler warnings on 32-bit

Partha P. Mukherjee ppm-guest at moszumanska.debian.org
Thu May 21 18:49:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.32
in repository libmath-prime-util-perl.

commit fcbdc060efb6a2f612dbdf805fcf37edba26cdf9
Author: Dana Jacobsen <dana at acm.org>
Date:   Tue Oct 15 23:37:11 2013 -0700

    Silence compiler warnings on 32-bit
---
 lehmer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lehmer.c b/lehmer.c
index 6aae90a..89b5290 100644
--- a/lehmer.c
+++ b/lehmer.c
@@ -303,7 +303,7 @@ static UV bs_prime_count(UV n, UV const* const primes, UV lastidx)
 }
 
 #define FAST_DIV(x,y) \
-  ( ((x) <= 4294967295) ? (uint32_t)(x)/(uint32_t)(y) : (x)/(y) )
+  ( ((x) <= 4294967295U) ? (uint32_t)(x)/(uint32_t)(y) : (x)/(y) )
 
 /* Use Mapes' method to calculate phi(x,a) for small a.  This is really
  * convenient and a little Perl script will spit this code out for whatever
@@ -323,7 +323,7 @@ static UV mapes(UV x, UV a)
   return (UV) val;
 }
 
-#define mapes7(x) ((x <= 4294967295) ? mapes7_32(x) : mapes7_64(x))
+#define mapes7(x) (((x) <= 4294967295U) ? mapes7_32(x) : mapes7_64(x))
 static UV mapes7_64(UV x) {    /* A tiny bit faster setup for a=7 */
   UV val = x-x/2-x/3-x/5+x/6-x/7+x/10-x/11-x/13+x/14+x/15-x/17+x/21+x/22+x/26
           -x/30+x/33+x/34+x/35+x/39-x/42+x/51+x/55+x/65-x/66-x/70+x/77-x/78

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git



More information about the Pkg-perl-cvs-commits mailing list