diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2021-04-20 19:01:30 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2021-05-07 18:25:07 +0200 |
commit | 1e053c698b7ff8f7b4cc3c7c6e9945b72c3d5286 (patch) | |
tree | 850fa1cc40b1012bde460bdf4b267855f0da358e | |
parent | 3120b86447defee11d11bb9e78e49311f3307324 (diff) | |
download | libexpat-git-1e053c698b7ff8f7b4cc3c7c6e9945b72c3d5286.tar.gz |
Autotools|CMake: Suppress -Wpedantic-ms-format false positives
Addresses warning:
ISO C does not support the ‘I64’ ms_printf length modifier.
It seems correct and relevant with __USE_MINGW_ANSI_STDIO, only.
And -Werror doesn't tolerate false positives...
-rw-r--r-- | expat/CMakeLists.txt | 4 | ||||
-rw-r--r-- | expat/configure.ac | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index 951df0ed..96ac5daa 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -248,6 +248,10 @@ if(FLAG_VISIBILITY) add_definitions(-DXML_ENABLE_VISIBILITY=1) set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -fvisibility=hidden") endif() +if(MINGW) + # Without __USE_MINGW_ANSI_STDIO the compiler produces a false positive + set(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -Wno-pedantic-ms-format") +endif() if (EXPAT_WARNINGS_AS_ERRORS) if(MSVC) add_definitions(/WX) diff --git a/expat/configure.ac b/expat/configure.ac index f26ce6cc..7d60a2c2 100644 --- a/expat/configure.ac +++ b/expat/configure.ac @@ -111,7 +111,7 @@ AS_IF([test "$GCC" = yes], AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing -Wmissing-prototypes -Wstrict-prototypes], [AM_CFLAGS]) AX_APPEND_COMPILE_FLAGS([-pedantic -Wduplicated-cond -Wduplicated-branches -Wlogical-op], [AM_CFLAGS]) AX_APPEND_COMPILE_FLAGS([-Wrestrict -Wnull-dereference -Wjump-misses-init -Wdouble-promotion], [AM_CFLAGS]) - AX_APPEND_COMPILE_FLAGS([-Wshadow -Wformat=2 -Wmisleading-indentation], [AM_CFLAGS])]) + AX_APPEND_COMPILE_FLAGS([-Wshadow -Wformat=2 -Wno-pedantic-ms-format -Wmisleading-indentation], [AM_CFLAGS])]) AC_LANG_PUSH([C++]) AC_PROG_CXX |