summaryrefslogtreecommitdiff
path: root/src/kwset.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-28 22:50:34 +0100
committerJim Meyering <meyering@redhat.com>2011-11-28 22:51:14 +0100
commitbbd6d2ec9eb72193b7720dfb568cec751df13509 (patch)
tree99db3edd795e2e29a1828ef85d977b76011590cf /src/kwset.c
parenta1482fbe39b58e26b8a05d9c5ed22969fbcf2f47 (diff)
downloadgrep-bbd6d2ec9eb72193b7720dfb568cec751df13509.tar.gz
build: accommodate -Werror=suggest-attribute=pure
Now that we're using the latest manywarnings module from gnulib, accommodate gcc's -Werror=suggest-attribute=pure option by marking suggested functions with gnulib-defined _GL_ATTRIBUTE_PURE. * src/kwset.c (hasevery): Mark function with pure attribute. (bmexec): Likewise. * src/dfa.c (nsubtoks, istrstr, find_pred, dfamusts): Likewise. * configure.ac: Disable (for lib/) options that seem not to be worth the trouble: -Wunsuffixed-float-constants and -Wformat-nonliteral.
Diffstat (limited to 'src/kwset.c')
-rw-r--r--src/kwset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kwset.c b/src/kwset.c
index ba556bbc..124096c7 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -350,7 +350,7 @@ treedelta (struct tree const *tree,
}
/* Return true if A has every label in B. */
-static int
+static int _GL_ATTRIBUTE_PURE
hasevery (struct tree const *a, struct tree const *b)
{
if (!b)
@@ -497,7 +497,7 @@ kwsprep (kwset_t kws)
}
/* Fast boyer-moore search. */
-static size_t
+static size_t _GL_ATTRIBUTE_PURE
bmexec (kwset_t kws, char const *text, size_t size)
{
struct kwset const *kwset;