]> 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>
Sun, 23 Oct 2022 12:55:48 +0000 (14:55 +0200)
CMakeLists.txt
configure

index 65827c227b0c7cbf275e8f5c606e13f3849903c0..aa70ebebc0ac75f125cd5761c303d383ae8498a8 100644 (file)
@@ -246,6 +246,9 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
             set(NOLTOFLAG "-fno-lto")
         endif()
     endif()
+    if(MINGW)
+        list(APPEND WARNFLAGS_DISABLE -Wno-pedantic-ms-format)
+    endif()
 else()
     if(WITH_NATIVE_INSTRUCTIONS)
         message(STATUS "Ignoring WITH_NATIVE_INSTRUCTIONS; not implemented yet on this configuration")
index ea4ac3977c5d5a17043eda2ea49d723b422993d7..2980e1effbcdd3f56f02cc8197473ea7bb9d3fbd 100755 (executable)
--- a/configure
+++ b/configure
@@ -459,7 +459,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}'