]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
[MinGW] Disable GCC warning about using MS format specifiers in ISO C conformant...
authorMika Lindqvist <postmaster@raasu.org>
Thu, 13 Oct 2022 15:18:52 +0000 (18:18 +0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 17 Mar 2023 20:27:56 +0000 (21:27 +0100)
CMakeLists.txt
configure

index a7c6806a5024a2a2b605f944d7a4814980eb3a55..94a701db18d2bf2720d55cef7dd2f9246bc9ff32 100644 (file)
@@ -191,6 +191,9 @@ elseif(MSVC)
     if(WITH_NATIVE_INSTRUCTIONS)
         message(STATUS "Ignoring WITH_NATIVE_INSTRUCTIONS; not supported on this configuration")
     endif()
+    if(MINGW)
+        list(APPEND WARNFLAGS_DISABLE -Wno-pedantic-ms-format)
+    endif()
 else()
     # catch all GNU C compilers as well as Clang and AppleClang
     if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
index cc51d21474535bcf21e31ede8636774c9aceca18..99bd0ff51de02d6a7d26572f862817ce0a5ae71c 100755 (executable)
--- a/configure
+++ b/configure
@@ -429,7 +429,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
         EXE='.exe' ;;
   MINGW* | mingw*)
         ARFLAGS="rcs"
-        CFLAGS="${CFLAGS} -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE=1"
+        CFLAGS="${CFLAGS} -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE=1 -Wno-pedantic-ms-format"
         SFLAGS="${CFLAGS}"
         shared_ext='.dll'
         sharedlibdir='${bindir}'