small patch to suppress a warning
Stephan Pleines
pleines.stephan at gmail.com
Wed Feb 10 16:26:39 UTC 2021
Hi,
This is a tiny patch to suppress a warning about operator precedence.
Thank you,
Stephan
diff -r 925753a1f950 mpz/pprime_p.c
--- a/mpz/pprime_p.c Mon Dec 21 00:48:03 2020 +0100
+++ b/mpz/pprime_p.c Wed Feb 10 08:21:36 2021 -0800
@@ -60,7 +60,7 @@
int is_prime;
unsigned long n0;
n0 = mpz_get_ui (n);
- is_prime = n0 & (n0 > 1) ? isprime (n0) : n0 == 2;
+ is_prime = (n0 & (n0 > 1)) ? isprime (n0) : n0 == 2;
return is_prime ? 2 : 0;
}
/* Negative number. Negate and fall out. */
-------------- next part --------------
diff -r 925753a1f950 mpz/pprime_p.c
--- a/mpz/pprime_p.c Mon Dec 21 00:48:03 2020 +0100
+++ b/mpz/pprime_p.c Wed Feb 10 08:21:55 2021 -0800
@@ -60,7 +60,7 @@
int is_prime;
unsigned long n0;
n0 = mpz_get_ui (n);
- is_prime = n0 & (n0 > 1) ? isprime (n0) : n0 == 2;
+ is_prime = (n0 & (n0 > 1)) ? isprime (n0) : n0 == 2;
return is_prime ? 2 : 0;
}
/* Negative number. Negate and fall out. */
More information about the gmp-bugs
mailing list