From d51cab2d3bb579b663c1211dfc1e69039165c06f Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 7 Mar 2014 11:16:16 -0800 Subject: Turned on Werror --- SetFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index 35831e7e9..e6ba782fc 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -182,7 +182,7 @@ macro(set_exe_flags) string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") - add_flags_cxx("-Wall -Wextra -Werror -Wno-error=unused-parameter") + add_flags_cxx("-Wall -Wextra -Werror -Wno-error=unused-parameter -Wno-error=switch") # we support non-IEEE 754 fpus so can make no guarentees about error add_flags_cxx("-ffast-math") -- cgit v1.2.3 From b4e3d0aa4e573200d1fffc3073e791c54d9eb20c Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 04:37:36 -0700 Subject: Turned off Wunused-parameter --- SetFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index e6ba782fc..4e20c84ab 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -182,7 +182,7 @@ macro(set_exe_flags) string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") - add_flags_cxx("-Wall -Wextra -Werror -Wno-error=unused-parameter -Wno-error=switch") + add_flags_cxx("-Wall -Wextra -Werror -Wno-unused-parameter -Wno-error=switch") # we support non-IEEE 754 fpus so can make no guarentees about error add_flags_cxx("-ffast-math") -- cgit v1.2.3 From 59d42ec5b2c666f1f50c9763dad13e97e2c6040f Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 04:58:08 -0700 Subject: Enabled loads of clang warnings --- SetFlags.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index 4e20c84ab..56d32b8fe 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -190,6 +190,8 @@ macro(set_exe_flags) # clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") add_flags_cxx("-D__extern_always_inline=inline") + add_flags_cxx("-Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion") + add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation") endif() endif() -- cgit v1.2.3 From c5436e1ae75928f08a411d29a0b28241c3f2b062 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 09:16:15 -0700 Subject: Lots more warnings --- SetFlags.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index 56d32b8fe..ec2f6c556 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -192,6 +192,15 @@ macro(set_exe_flags) add_flags_cxx("-D__extern_always_inline=inline") add_flags_cxx("-Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion") add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation") + add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-error=padded") + add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal") + add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor") + add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow") + add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations") + add_flags_cxx("-Wno-error=cast-align -Wno-error=unused-macros") + add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough") + add_flags_cxx("-Wno-missing-noreturn -Wno-error=unreachable-code -Wno-error=undef") + add_flags_cxx("-Wno-error=format-nonliteral") endif() endif() -- cgit v1.2.3 From 676dcfd1c74a36882b5b9bb75749e3bd86b75d9e Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 10:32:56 -0700 Subject: Globals.h is now warnings free again. Also turned off Wpadded as it is indicates potental performance issues rather than potential bugs --- SetFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index ec2f6c556..82472f333 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -192,7 +192,7 @@ macro(set_exe_flags) add_flags_cxx("-D__extern_always_inline=inline") add_flags_cxx("-Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion") add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation") - add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-error=padded") + add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-padded") add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal") add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor") add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow") -- cgit v1.2.3 From 713c59b60b6a096554eda7fabc7696b33a6fcb59 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 10:41:53 -0700 Subject: Treat enum missmatches as warnings for now as there is such a large number of them. --- SetFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index 82472f333..e71bf315d 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -182,7 +182,7 @@ macro(set_exe_flags) string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") - add_flags_cxx("-Wall -Wextra -Werror -Wno-unused-parameter -Wno-error=switch") + add_flags_cxx("-Wall -Wextra -Werror -Wno-unused-parameter -Wno-error=switch -Wno-error=enum-compare") # we support non-IEEE 754 fpus so can make no guarentees about error add_flags_cxx("-ffast-math") -- cgit v1.2.3 From 617ad0b5f8e8d469ec017a0e83754f7401f64d00 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 10:46:39 -0700 Subject: Only enable -Werror in gcc because gcc doesn't let you suppress enum missmatch warnings --- SetFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index e71bf315d..a9657fff1 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -182,7 +182,7 @@ macro(set_exe_flags) string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") - add_flags_cxx("-Wall -Wextra -Werror -Wno-unused-parameter -Wno-error=switch -Wno-error=enum-compare") + add_flags_cxx("-Wall -Wextra -Wno-unused-parameter -Wno-error=switch") # we support non-IEEE 754 fpus so can make no guarentees about error add_flags_cxx("-ffast-math") @@ -190,7 +190,7 @@ macro(set_exe_flags) # clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") add_flags_cxx("-D__extern_always_inline=inline") - add_flags_cxx("-Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion") + add_flags_cxx("-Werror -Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion") add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation") add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-padded") add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal") -- cgit v1.2.3 From 693734bd8307f3089368cb3aca662641f92f2e71 Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 10 Mar 2014 11:57:04 -0700 Subject: Enable error on cast-align and unused macros --- SetFlags.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index a9657fff1..d9308f603 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -197,7 +197,6 @@ macro(set_exe_flags) add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor") add_flags_cxx("-Wno-error=covered-switch-default -Wno-error=shadow") add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations") - add_flags_cxx("-Wno-error=cast-align -Wno-error=unused-macros") add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough") add_flags_cxx("-Wno-missing-noreturn -Wno-error=unreachable-code -Wno-error=undef") add_flags_cxx("-Wno-error=format-nonliteral") -- cgit v1.2.3 From 0fc4a1ee06199db80edd4a9f79a4ba1c4369f656 Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 11 Mar 2014 12:36:51 -0700 Subject: Move comment --- SetFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index d9308f603..25310c368 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -187,8 +187,8 @@ macro(set_exe_flags) # we support non-IEEE 754 fpus so can make no guarentees about error add_flags_cxx("-ffast-math") - # clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math add_flags_cxx("-D__extern_always_inline=inline") add_flags_cxx("-Werror -Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion") add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation") -- cgit v1.2.3 From 9c6ca5a3edcfbcd1e9a18eec463ce7702770ceb2 Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 11 Mar 2014 14:43:56 -0700 Subject: made format-nonliteral an error --- SetFlags.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index 25310c368..42cfa6769 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -199,7 +199,6 @@ macro(set_exe_flags) add_flags_cxx("-Wno-error=exit-time-destructors -Wno-error=missing-variable-declarations") add_flags_cxx("-Wno-error=global-constructors -Wno-implicit-fallthrough") add_flags_cxx("-Wno-missing-noreturn -Wno-error=unreachable-code -Wno-error=undef") - add_flags_cxx("-Wno-error=format-nonliteral") endif() endif() -- cgit v1.2.3