← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~hjd/widelands/warnings into lp:widelands

 

Hans Joachim Desserud has proposed merging lp:~hjd/widelands/warnings into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1033615 in widelands: "Consider checking for more warnings when compiling Widelands with WL_EXTRAWARNINGS"
  https://bugs.launchpad.net/widelands/+bug/1033615

For more details, see:
https://code.launchpad.net/~hjd/widelands/warnings/+merge/145089

Adds some more of the suggested warnings, resulting in ~4300 more lines of warnings (gcc). Mostly due to -Wshadow, but also a couple from -Wformat-nonliteral.

(Additionally adds a couple others. -Wundef has found issues before, some of the others might not be high-priority, but they don't add any noise at least.)
-- 
https://code.launchpad.net/~hjd/widelands/warnings/+merge/145089
Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/warnings into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2013-01-04 15:17:39 +0000
+++ CMakeLists.txt	2013-01-27 15:04:25 +0000
@@ -158,8 +158,8 @@
 set (PARAMETER_COMPILERFLAG_OLDSTYLECAST_EXTENDED "-Wold-style-cast -isystem ${Boost_INCLUDE_DIR}")
 set (PARAMETER_COMPILERFLAG_OLDSTYLECAST "-Wold-style-cast")
 set (PARAMETER_COMPILERFLAG_GENERICWARNINGS "-Wall -Wextra")
-set (PARAMETER_COMPILERFLAG_EXTRAWARNINGS "-Wsign-promo")
-set (PARAMETER_COMPILERFLAG_GCCWARNINGS "-Wlogical-op")
+set (PARAMETER_COMPILERFLAG_EXTRAWARNINGS "-Wshadow -Wsign-promo -Wundef -Wunused -Wformat -Wformat-nonliteral -Wformat-security")
+set (PARAMETER_COMPILERFLAG_GCCWARNINGS "-Wlogical-op -Wsync-nand -Wtrampolines")
 set (PARAMETER_COMPILERFLAG_STRICT "-Werror -Wno-error=old-style-cast -Wno-error=deprecated-declarations -fdiagnostics-show-option")
 IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
   include(CheckCXXCompilerFlag) #this include should be safe


Follow ups