diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-05-26 20:08:21 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-06-13 18:19:23 -0400 |
commit | efc89c032b18d149308a1f8c1a371f503edb91d1 (patch) | |
tree | dafbdc3a20ad07f24ee92c4583e3e84ecf01ab02 /src/CMakeLists.txt | |
parent | d0328f49f1ebcc061ba2db34bb3ae49605ca97fa (diff) |
CMakeLists: Make variable shadowing a compile-time error
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9182dbfd4..39d038493 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -65,6 +65,10 @@ if (MSVC) /we4305 # 'context': truncation from 'type1' to 'type2' /we4388 # 'expression': signed/unsigned mismatch /we4389 # 'operator': signed/unsigned mismatch + /we4456 # Declaration of 'identifier' hides previous local declaration + /we4457 # Declaration of 'identifier' hides function parameter + /we4458 # Declaration of 'identifier' hides class member + /we4459 # Declaration of 'identifier' hides global declaration /we4505 # 'function': unreferenced local function has been removed /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'? @@ -92,6 +96,7 @@ else() -Werror=missing-declarations -Werror=missing-field-initializers -Werror=reorder + -Werror=shadow -Werror=sign-compare -Werror=switch -Werror=uninitialized |