coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: [PATCH] maint: factor.c: avoid new GCC 12 warning


From: Jim Meyering
Subject: FYI: [PATCH] maint: factor.c: avoid new GCC 12 warning
Date: Tue, 14 Dec 2021 19:59:26 -0800

I've just pushed this:

maint: factor.c: avoid new GCC 12 warning
* src/factor.c (millerrabin2): Mark as ATTRIBUTE_PURE,
per advice from GCC 12.
---
 src/factor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/factor.c b/src/factor.c
index caa97cbd2..7fc30717a 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -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)
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]