mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-06 13:45:00 +00:00
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...
This commit is contained in:
parent
3120b86447
commit
1e053c698b
2 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue