summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-09-19 11:07:41 +0200
committerJim Meyering <meyering@redhat.com>2012-10-04 21:33:05 +0200
commitcf67e4cc9025ce921230b821cb7e75bce06876cd (patch)
tree96604fd34b5ee3951216b16cdba7323072fef39d /src
parent1fb5db95aaddc8216449052f11c5da05c8571db5 (diff)
downloadcoreutils-cf67e4cc9025ce921230b821cb7e75bce06876cd.tar.xz
maint: make-prime-list: avoid -Wsuggest-attribute=const warning
* src/make-prime-list.c: Include <config.h>. (binvert): Add _GL_ATTRIBUTE_CONST.
Diffstat (limited to 'src')
-rw-r--r--src/make-prime-list.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/make-prime-list.c b/src/make-prime-list.c
index 1f5b3ce11..724924b40 100644
--- a/src/make-prime-list.c
+++ b/src/make-prime-list.c
@@ -17,6 +17,8 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see http://www.gnu.org/licenses/. */
+#include <config.h>
+
#include <stdint.h>
#include <stdio.h>
#include <string.h>
@@ -29,7 +31,7 @@ struct prime
uintmax_t lim; /* floor(UINTMAX_MAX / p) */
};
-static uintmax_t
+static uintmax_t _GL_ATTRIBUTE_CONST
binvert (uintmax_t a)
{
uintmax_t x = 0xf5397db1 >> (4*((a/2) & 0x7));