From 834bb313405bce621610862e76891377ab6601d5 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 7 May 2023 01:14:42 +0200 Subject: Silence another false 'shadows builtin function' warning on MinGW --- src/oplist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/oplist.c b/src/oplist.c index 9c6b1d9..2c7d26c 100644 --- a/src/oplist.c +++ b/src/oplist.c @@ -71,6 +71,8 @@ void plist_ostep_set_debug(int debug) } #ifndef HAVE_STRNDUP +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" static char* strndup(const char* str, size_t len) { char *newstr = (char *)malloc(len+1); @@ -80,6 +82,7 @@ static char* strndup(const char* str, size_t len) } return newstr; } +#pragma GCC diagnostic pop #endif static size_t dtostr(char *buf, size_t bufsize, double realval) -- cgit v1.1-32-gdbae