mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 17:21:57 +00:00
Add -Wuseless-cast to the pedantic flags.
This commit is contained in:
parent
36f05a020d
commit
7a3fa073da
@ -314,6 +314,12 @@ check_compiler_has_flag(
|
||||
HAS_COMPILER_FLAG_WMISMATCHED_TAGS
|
||||
)
|
||||
|
||||
check_compiler_has_flag(
|
||||
CXX_FLAGS_PEDANTIC_COMPILATION
|
||||
"-Wuseless-cast"
|
||||
HAS_COMPILER_FLAG_WUSELESS_CAST
|
||||
)
|
||||
|
||||
|
||||
### Set the final compiler flags.
|
||||
|
||||
|
@ -62,6 +62,7 @@ Version 1.11.0+svn:
|
||||
* Fix OOS when dismissing a recall in a multiplayer campaign (bug #19924).
|
||||
* Fixed a bug disallowing the left shift and meta key to be detected in
|
||||
the hotkeys
|
||||
* Added -Wuseless-cast to the CMake pedantic flags.
|
||||
|
||||
Version 1.11.0:
|
||||
* Add-ons client:
|
||||
|
@ -309,14 +309,20 @@ add_library(wesnoth-lua ${LIBRARY_TYPE} EXCLUDE_FROM_ALL ${libwesnoth-lua_STAT_S
|
||||
# uses it. Force the flag off for these files. (We don't enable it in our
|
||||
# generic compiler flags, but allows people to do it.)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set_target_properties(wesnoth-lua PROPERTIES COMPILE_FLAGS "-Wno-old-style-cast")
|
||||
set_target_properties(wesnoth-lua
|
||||
PROPERTIES COMPILE_FLAGS
|
||||
"-Wno-old-style-cast -Wno-useless-cast"
|
||||
)
|
||||
set_source_files_properties(
|
||||
clipboard.cpp
|
||||
network.cpp
|
||||
network_worker.cpp
|
||||
text.cpp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-old-style-cast")
|
||||
set_source_files_properties(
|
||||
text.cpp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-old-style-cast -Wno-useless-cast")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
########### Helper libraries ###############
|
||||
|
Loading…
x
Reference in New Issue
Block a user