From dd1474e2801c6e0261e8a2d88fbe189789f76d14 Mon Sep 17 00:00:00 2001 From: ThatOSDev <100424906+ThatOSDev@users.noreply.github.com> Date: Tue, 2 Jul 2024 13:12:58 -0600 Subject: [PATCH] Update zip.c (#5639) Now works with GCC without failing the compilation. Co-authored-by: Kim Kulling --- contrib/zip/src/zip.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/zip/src/zip.c b/contrib/zip/src/zip.c index ac520a265..deef56178 100644 --- a/contrib/zip/src/zip.c +++ b/contrib/zip/src/zip.c @@ -13,10 +13,14 @@ #include #include +#if defined(_MSC_VER) +/* For Visual Studio only, NOT MinGW (GCC) -- ThatOSDev */ +#pragma warning( disable : 4706 ) +#endif + #if defined(_WIN32) || defined(__WIN32__) || defined(_MSC_VER) || \ defined(__MINGW32__) -/* Win32, DOS, MSVC, MSVS */ -#pragma warning( disable : 4706 ) +/* Win32, DOS, MSVC, MSVS, MinGW(GCC for windows) */ #include #define STRCLONE(STR) ((STR) ? _strdup(STR) : NULL)