From: Mika Lindqvist Date: Thu, 13 Oct 2022 15:18:52 +0000 (+0300) Subject: [MinGW] Disable GCC warning about using MS format specifiers in ISO C conformant... X-Git-Tag: 2.1.0-beta1~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=185f636e777371985e9c5323e42fc4d718d2c5b6;p=thirdparty%2Fzlib-ng.git [MinGW] Disable GCC warning about using MS format specifiers in ISO C conformant code --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 65827c227..aa70ebebc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/configure b/configure index ea4ac3977..2980e1eff 100755 --- 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}'