summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-05-21 13:38:29 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-05-21 13:39:15 -0700
commitdd2503c8e73621e919e8e214a29c495ac89d8a92 (patch)
treea001103baba15eb49f7641fa3a214e8220ec6ee0 /lib
parent48d435837763e925096f710c8f2fe4c5c6ddd8c5 (diff)
downloadgnulib-dd2503c8e73621e919e8e214a29c495ac89d8a92.tar.gz
strstr-simple: pacify GCC 12.1
* lib/str-two-way.h (two_way_long_needle): Pacify GCC 12.1 -Wsuggest-attribute=pure (x86-64, -O2).
Diffstat (limited to 'lib')
-rw-r--r--lib/str-two-way.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/str-two-way.h b/lib/str-two-way.h
index 7ee344aea1..b00017c0b4 100644
--- a/lib/str-two-way.h
+++ b/lib/str-two-way.h
@@ -231,7 +231,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len,
most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */
-static RETURN_TYPE
+static RETURN_TYPE _GL_ATTRIBUTE_PURE
two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
const unsigned char *needle, size_t needle_len)
{
@@ -325,7 +325,7 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
sublinear performance is not possible. */
-static RETURN_TYPE
+static RETURN_TYPE _GL_ATTRIBUTE_PURE
two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
const unsigned char *needle, size_t needle_len)
{