summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Lindqvist <postmaster@raasu.org>2022-10-13 18:18:52 +0300
committerHans Kristian Rosbach <hk-github@circlestorm.org>2023-03-17 21:27:56 +0100
commit4113acec6b27488faeb74492f02b771832b11d97 (patch)
tree5380813e50302c354261718d26a579e957c2f319
parentd2a13a8fd4a0ffc5e25102717d26b30f6e05d092 (diff)
[MinGW] Disable GCC warning about using MS format specifiers in ISO C conformant code
-rw-r--r--CMakeLists.txt3
-rwxr-xr-xconfigure2
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a7c6806..94a701d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")
diff --git a/configure b/configure
index cc51d21..99bd0ff 100755
--- 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}'