Commit 54a60ced by Edward Thomson

mingw: disable format specification warnings

MinGW uses gcc, which expects POSIX formatting for printf, but uses the
Windows C library, which uses its own format specifiers.  Therefore, it
gets confused about format specifiers.  Disable warnings for format
specifiers.
parent e2aba8ba
...@@ -239,10 +239,18 @@ ELSE () ...@@ -239,10 +239,18 @@ ELSE ()
ENABLE_WARNINGS(shift-count-overflow) ENABLE_WARNINGS(shift-count-overflow)
ENABLE_WARNINGS(unused-const-variable) ENABLE_WARNINGS(unused-const-variable)
ENABLE_WARNINGS(unused-function) ENABLE_WARNINGS(unused-function)
ENABLE_WARNINGS(int-conversion)
# MinGW uses gcc, which expects POSIX formatting for printf, but
# uses the Windows C library, which uses its own format specifiers.
# Disable format specifier warnings.
IF(MINGW)
DISABLE_WARNINGS(format)
DISABLE_WARNINGS(format-security)
ELSE()
ENABLE_WARNINGS(format) ENABLE_WARNINGS(format)
ENABLE_WARNINGS(format-security) ENABLE_WARNINGS(format-security)
ENABLE_WARNINGS(int-conversion) ENDIF()
DISABLE_WARNINGS(documentation-deprecated-sync)
IF (PROFILE) IF (PROFILE)
SET(CMAKE_C_FLAGS "-pg ${CMAKE_C_FLAGS}") SET(CMAKE_C_FLAGS "-pg ${CMAKE_C_FLAGS}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment