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