diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2021-09-03 13:51:30 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2021-09-03 13:51:30 +0300 |
commit | c2fe205b508c32117d2d0f132953d096254d5a7b (patch) | |
tree | 47b5fda2676eebd8a3bac16abde0d3db59f9226c /newlib/libc/string/str-two-way.h | |
parent | 6a35ae33f5c76f0cda6466fb4b426ff37ed534a1 (diff) |
strstr: avoid warnings
unused function warning for two_way_short_needle,
different char type warnings for standard string functions
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/string/str-two-way.h')
-rw-r--r-- | newlib/libc/string/str-two-way.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libc/string/str-two-way.h b/newlib/libc/string/str-two-way.h index 90345a8de..e13f94907 100644 --- a/newlib/libc/string/str-two-way.h +++ b/newlib/libc/string/str-two-way.h @@ -195,7 +195,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 __attribute__ ((__used__)) two_way_short_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { @@ -289,7 +289,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. */ -_NOINLINE_STATIC RETURN_TYPE +_NOINLINE_STATIC RETURN_TYPE __attribute__ ((__used__)) two_way_long_needle (const unsigned char *haystack, size_t haystack_len, const unsigned char *needle, size_t needle_len) { |