Add -Wformat (see issue #15792), no idea if ok.

Unfamiliar with CMake, just added a couple of lines at relevant-looking place.

I did, at least, test that is compiles (and enables that flag) on my machine.
This commit is contained in:
fp64 2022-08-07 09:12:58 -04:00 committed by GitHub
parent 119137ee6a
commit 48aed2fabc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -350,6 +350,9 @@ if(NOT MSVC)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -D_NDEBUG")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")
# Enable checking printf-like format strings (also works for logging functions)
add_definitions(-Wformat)
# Disable some warnings
add_definitions(-Wno-multichar)