diff options
| author | 2023-05-07 01:08:00 +0200 | |
|---|---|---|
| committer | 2023-05-07 01:08:00 +0200 | |
| commit | ff842f7047915fd89eda17644441e605b8d0c846 (patch) | |
| tree | c16724fb074057e31002fef6be128db8e0e0d583 | |
| parent | 1d45b855dab1c486aea470a7c9ceb30a9cab5d4b (diff) | |
| download | libplist-ff842f7047915fd89eda17644441e605b8d0c846.tar.gz libplist-ff842f7047915fd89eda17644441e605b8d0c846.tar.bz2 | |
Silence false 'shadows builtin function' warning on MinGW
| -rw-r--r-- | src/jplist.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | #ifndef HAVE_STRNDUP | 74 | #ifndef HAVE_STRNDUP |
| 75 | #pragma GCC diagnostic push | ||
| 76 | #pragma GCC diagnostic ignored "-Wshadow" | ||
| 75 | static char* strndup(const char* str, size_t len) | 77 | static char* strndup(const char* str, size_t len) |
| 76 | { | 78 | { |
| 77 | char *newstr = (char *)malloc(len+1); | 79 | char *newstr = (char *)malloc(len+1); |
| @@ -81,6 +83,7 @@ static char* strndup(const char* str, size_t len) | |||
| 81 | } | 83 | } |
| 82 | return newstr; | 84 | return newstr; |
| 83 | } | 85 | } |
| 86 | #pragma GCC diagnostic pop | ||
| 84 | #endif | 87 | #endif |
| 85 | 88 | ||
| 86 | static size_t dtostr(char *buf, size_t bufsize, double realval) | 89 | static size_t dtostr(char *buf, size_t bufsize, double realval) |
