]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: factor.c: avoid new GCC 12 warning
authorJim Meyering <meyering@fb.com>
Sun, 12 Dec 2021 03:48:10 +0000 (19:48 -0800)
committerJim Meyering <meyering@fb.com>
Wed, 15 Dec 2021 03:52:50 +0000 (19:52 -0800)
* src/factor.c (millerrabin2): Mark as ATTRIBUTE_PURE,
per advice from GCC 12.

src/factor.c

index caa97cbd27c2b9a6b3b5c1eedc64462bcdc2f4e5..7fc30717a781ff924569272c195b89759322e24e 100644 (file)
@@ -1137,7 +1137,7 @@ millerrabin (uintmax_t n, uintmax_t ni, uintmax_t b, uintmax_t q,
   return false;
 }
 
-static bool
+ATTRIBUTE_PURE static bool
 millerrabin2 (const uintmax_t *np, uintmax_t ni, const uintmax_t *bp,
               const uintmax_t *qp, unsigned int k, const uintmax_t *one)
 {