summaryrefslogtreecommitdiffstats
path: root/src/jplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jplist.c')
-rw-r--r--src/jplist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jplist.c b/src/jplist.c
index 4f30cd0..1c7a932 100644
--- a/src/jplist.c
+++ b/src/jplist.c
@@ -72,8 +72,10 @@ void plist_json_set_debug(int debug)
72} 72}
73 73
74#ifndef HAVE_STRNDUP 74#ifndef HAVE_STRNDUP
75#ifndef _MSC_VER
75#pragma GCC diagnostic push 76#pragma GCC diagnostic push
76#pragma GCC diagnostic ignored "-Wshadow" 77#pragma GCC diagnostic ignored "-Wshadow"
78#endif
77static char* strndup(const char* str, size_t len) 79static char* strndup(const char* str, size_t len)
78{ 80{
79 char *newstr = (char *)malloc(len+1); 81 char *newstr = (char *)malloc(len+1);
@@ -83,8 +85,10 @@ static char* strndup(const char* str, size_t len)
83 } 85 }
84 return newstr; 86 return newstr;
85} 87}
88#ifndef _MSC_VER
86#pragma GCC diagnostic pop 89#pragma GCC diagnostic pop
87#endif 90#endif
91#endif
88 92
89static size_t dtostr(char *buf, size_t bufsize, double realval) 93static size_t dtostr(char *buf, size_t bufsize, double realval)
90{ 94{