mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 00:05:35 +00:00
Only pass -Wformat-signedness to versions of GCC that support it.
Fixes #3478 Signed-off-by: okhowang(王沛文) <okhowang@tencent.com>
This commit is contained in:
parent
527b87890d
commit
0cd8e0f6a7
|
@ -165,7 +165,10 @@ if(CMAKE_COMPILER_IS_GNU)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wlogical-op")
|
||||
endif()
|
||||
if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow -Wformat-signedness")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
|
||||
endif()
|
||||
if (GCC_VERSION VERSION_GREATER 5.0)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat-signedness")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-O0 -g3")
|
||||
|
|
3
ChangeLog.d/format-signedness.txt
Normal file
3
ChangeLog.d/format-signedness.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Changes
|
||||
* Only pass -Wformat-signedness to versions of GCC that support it. Reported
|
||||
in #3478 and fix contributed in #3479 by okhowang.
|
Loading…
Reference in a new issue