mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
make format-warnings hard compile errors
Code such as `report_info("msg: %s", i)` may crash if `i` is not a string type. To avoid such problems make format-warnings hard compile errors. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
556ecd5a9b
commit
177a1a6706
1 changed files with 2 additions and 2 deletions
|
@ -124,8 +124,8 @@ if (SUBSURFACE_ASAN_BUILD)
|
|||
endif()
|
||||
|
||||
# every compiler understands -Wall
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=format")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=format")
|
||||
|
||||
# by detault optimize with -O2 even for debug builds
|
||||
set (GCC_OPTIMIZATION_FLAGS "-O2" CACHE STRING "GCC optimization flags")
|
||||
|
|
Loading…
Reference in a new issue