mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 18:25:35 +00:00
Raise level of -Wformat-truncation to 2
This was not possible earlier due to warnings, however now this seems to be ok. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
3a5a107fa7
commit
21c62a2aed
|
@ -198,8 +198,7 @@ if(CMAKE_COMPILER_IS_GNU)
|
|||
endif()
|
||||
endif()
|
||||
if (GCC_VERSION VERSION_GREATER 7.0 OR GCC_VERSION VERSION_EQUAL 7.0)
|
||||
# Cannot use -Wformat-truncation=2 as this fails on mbedtls_snprintf (unknown buffer size)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-overflow=2 -Wformat-truncation=2")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
|
||||
|
|
Loading…
Reference in a new issue