Author: tfaber
Date: Sat May 9 22:44:52 2015
New Revision: 67607
URL:
http://svn.reactos.org/svn/reactos?rev=67607&view=rev
Log:
[CMAKE]
- Enable C4189 (local variable initialized but not referenced) on MSVC builds and make it
an error.
CORE-9676 #resolve
Modified:
trunk/reactos/cmake/msvc.cmake
trunk/reactos/dll/opengl/mesa/swrast/CMakeLists.txt
trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=67607…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sat May 9 22:44:52 2015
@@ -59,11 +59,12 @@
# - C4129: unrecognized escape sequence
# - TODO: C4133: incompatible types
# - C4163: 'identifier': not available as an intrinsic function
+# - C4189: local variable initialized but not referenced
# - C4229: modifiers on data are ignored
# - C4700: uninitialized variable usage
# - C4603: macro is not defined or definition is different after precompiled header use
# - C4716: function must return a value
-add_compile_flags("/we4013 /we4020 /we4022 /we4047 /we4098 /we4113 /we4129 /we4163
/we4229 /we4700 /we4603 /we4716")
+add_compile_flags("/we4013 /we4020 /we4022 /we4047 /we4098 /we4113 /we4129 /we4163
/we4189 /we4229 /we4700 /we4603 /we4716")
# Enable warnings above the default level, but don't treat them as errors:
# - C4115: named type definition in parentheses
Modified: trunk/reactos/dll/opengl/mesa/swrast/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/swrast/CMa…
==============================================================================
--- trunk/reactos/dll/opengl/mesa/swrast/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/opengl/mesa/swrast/CMakeLists.txt [iso-8859-1] Sat May 9 22:44:52
2015
@@ -30,6 +30,8 @@
add_library(mesa_swrast STATIC ${SOURCE})
add_pch(mesa_swrast precomp.h SOURCE)
-if(NOT MSVC)
+if(MSVC)
+ add_target_compile_flags(mesa_swrast "/wd4189")
+else()
add_target_compile_flags(mesa_swrast "-Wno-unused-variable")
endif()
Modified: trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libxml2/CMake…
==============================================================================
--- trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/lib/3rdparty/libxml2/CMakeLists.txt [iso-8859-1] Sat May 9 22:44:52
2015
@@ -67,6 +67,8 @@
add_pch(libxml2 libxml.h SOURCE)
add_dependencies(libxml2 psdk)
-if(NOT MSVC)
+if(MSVC)
+ add_target_compile_flags(libxml2 "/wd4189")
+else()
add_target_compile_flags(libxml2 "-w")
endif()