MSVC: Set the warning C4189 from level 4 to level 3
authormano-wii <germano.costa@ig.com.br>
Wed, 29 Aug 2018 16:08:00 +0000 (13:08 -0300)
committermano-wii <germano.costa@ig.com.br>
Wed, 29 Aug 2018 16:59:04 +0000 (13:59 -0300)
This is a useful warning and there is an equivalent used in `GNUC` and `clang` compilers.

Reviewed on IRC by @brecht and @LazyDodo

CMakeLists.txt

index ccc6a1e9d1493a743ab07e3e20f588c6b1a3ab42..7e3b1c79da4787544a4b9bac7f5a8eff8c9bd218 100644 (file)
@@ -1450,6 +1450,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
                # warning level:
                "/W3"
                "/w34062"  # switch statement contains 'default' but no 'case' labels
+               "/w34189"  # local variable is initialized but not referenced
                # disable:
                "/wd4018"  # signed/unsigned mismatch
                "/wd4146"  # unary minus operator applied to unsigned type, result still unsigned