Skip to content

Commit 11ecf5c

Browse files
committed
[CMAKE] Enable C4101 (unreferenced local variable) for MSVC builds.
This is already an error in GCC builds, so will make it harder for the MSVC crowd to accidentally break GCC build.
1 parent cdb6af0 commit 11ecf5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdk/cmake/msvc.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ add_compile_flags("/wd4018")
9595
# - TODO: C4090: different 'modifier' qualifiers (for C programs only;
9696
# for C++ programs, the compiler error C2440 is issued)
9797
# - C4098: void function returning a value
98+
# - C4101: unreferenced local variable
9899
# - C4113: parameter lists differ
99100
# - C4129: unrecognized escape sequence
100101
# - C4133: incompatible types - from '<x> *' to '<y> *'
@@ -108,7 +109,7 @@ add_compile_flags("/wd4018")
108109
# - C4700: uninitialized variable usage
109110
# - C4715: 'function': not all control paths return a value
110111
# - C4716: function must return a value
111-
add_compile_flags("/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4113 /we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716")
112+
add_compile_flags("/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4101 /we4113 /we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716")
112113

113114
# - C4189: local variable initialized but not referenced
114115
# Not in Release mode and not with MSVC 2010

0 commit comments

Comments
 (0)