https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f4de12e9f4c388a977b71…
commit f4de12e9f4c388a977b716e8298a2e5f1dc64433
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Jul 10 12:45:04 2021 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sun Jul 11 21:45:29 2021 +0200
[CMAKE] Don't turn C4101 (unreferenced local variable) into an error on release
builds
---
sdk/cmake/msvc.cmake | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index b647f839d85..e6b533a5bb4 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -97,7 +97,6 @@ add_compile_options(/wd4018)
# - TODO: C4090: different 'modifier' qualifiers (for C programs only;
# for C++ programs, the compiler error C2440 is issued)
# - C4098: void function returning a value
-# - C4101: unreferenced local variable
# - C4113: parameter lists differ
# - C4129: unrecognized escape sequence
# - C4133: incompatible types - from '<x> *' to '<y> *'
@@ -111,12 +110,13 @@ add_compile_options(/wd4018)
# - C4700: uninitialized variable usage
# - C4715: 'function': not all control paths return a value
# - C4716: function must return a value
-add_compile_options(/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4101 /we4113
/we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715
/we4716)
+add_compile_options(/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4113 /we4129
/we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716)
+# - C4101: unreferenced local variable
# - C4189: local variable initialized but not referenced
# Not in Release mode, msbuild generator doesn't like CMAKE_BUILD_TYPE
if(MSVC_IDE OR CMAKE_BUILD_TYPE STREQUAL "Debug")
- add_compile_options(/we4189)
+ add_compile_options(/we4101 /we4189)
endif()
# Enable warnings above the default level, but don't treat them as errors: