[Bf-blender-cvs] [9576d03] master: CMake: add -Wformat-signedness

Campbell Barton noreply at git.blender.org
Fri Apr 24 11:15:14 CEST 2015


Commit: 9576d03f50fdc082aa0df91bb021a317b5c93090
Author: Campbell Barton
Date:   Fri Apr 24 19:11:02 2015 +1000
Branches: master
https://developer.blender.org/rB9576d03f50fdc082aa0df91bb021a317b5c93090

CMake: add -Wformat-signedness

===================================================================

M	CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd37aa1..bdaefb0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2524,6 +2524,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
+	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
 
 	# gcc 4.2 gives annoying warnings on every file with this
 	if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
@@ -2560,6 +2561,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_PARAMETER -Wunused-parameter)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_WRITE_STRINGS -Wwrite-strings)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
+	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_FORMAT_SIGN -Wformat-signedness)
 
 	# gcc 4.2 gives annoying warnings on every file with this
 	if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")




More information about the Bf-blender-cvs mailing list