From 1813edad70efd32feba4f5778536de264241132e Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Thu, 28 Nov 2024 16:22:09 +0100 Subject: Fix warnings on MSVC --- src/oplist.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/oplist.c') 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) { -- cgit v1.1-32-gdbae