From ff842f7047915fd89eda17644441e605b8d0c846 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 7 May 2023 01:08:00 +0200 Subject: Silence false 'shadows builtin function' warning on MinGW --- src/jplist.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/jplist.c') diff --git a/src/jplist.c b/src/jplist.c index 047b423..d6ea942 100644 --- a/src/jplist.c +++ b/src/jplist.c @@ -72,6 +72,8 @@ void plist_json_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); @@ -81,6 +83,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.2.1