diff options
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/posix/engine.c | 3 | ||||
-rw-r--r-- | newlib/libc/string/strcasestr.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/newlib/libc/posix/engine.c b/newlib/libc/posix/engine.c index 5956e2747..73ce45c11 100644 --- a/newlib/libc/posix/engine.c +++ b/newlib/libc/posix/engine.c @@ -364,9 +364,12 @@ sopno stopst; char *ssp; /* start of string matched by subsubRE */ char *sep; /* end of string matched by subsubRE */ char *oldssp; /* previous ssp */ +#if defined (__GNUC__) && \ + ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) /* dp is only used for assertion testing which, for some reason, is not recognized as usage. */ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif char *dp; AT("diss", start, stop, startst, stopst); diff --git a/newlib/libc/string/strcasestr.c b/newlib/libc/string/strcasestr.c index 8ff91fdd8..91783164c 100644 --- a/newlib/libc/string/strcasestr.c +++ b/newlib/libc/string/strcasestr.c @@ -84,8 +84,11 @@ QUICKREF (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ && ((h_l) = (j) + (n_l))) # define CANON_ELEMENT(c) tolower (c) +#if defined (__GNUC__) && \ + ((__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || __GNUC__ > 4) /* strncasecmp uses signed char, CMP_FUNC is expected to use unsigned char. */ #pragma GCC diagnostic ignored "-Wpointer-sign" +#endif # define CMP_FUNC strncasecmp # include "str-two-way.h" #endif |