summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jplist.c4
-rw-r--r--src/oplist.c4
2 files changed, 8 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)
}
#ifndef HAVE_STRNDUP
+#ifndef _MSC_VER
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
+#endif
static char* strndup(const char* str, size_t len)
{
char *newstr = (char *)malloc(len+1);
@@ -83,8 +85,10 @@ static char* strndup(const char* str, size_t len)
}
return newstr;
}
+#ifndef _MSC_VER
#pragma GCC diagnostic pop
#endif
+#endif
static size_t dtostr(char *buf, size_t bufsize, double realval)
{
diff --git a/src/oplist.c b/src/oplist.c
index 6ab6603..33896f9 100644
--- a/src/oplist.c
+++ b/src/oplist.c
@@ -71,8 +71,10 @@ void plist_ostep_set_debug(int debug)
}
#ifndef HAVE_STRNDUP
+#ifndef _MSC_VER
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
+#endif
static char* strndup(const char* str, size_t len)
{
char *newstr = (char *)malloc(len+1);
@@ -82,8 +84,10 @@ static char* strndup(const char* str, size_t len)
}
return newstr;
}
+#ifndef _MSC_VER
#pragma GCC diagnostic pop
#endif
+#endif
static size_t dtostr(char *buf, size_t bufsize, double realval)
{