summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Morph2022-05-26 20:08:21 -0400
committerGravatar Morph2022-06-13 18:19:23 -0400
commitefc89c032b18d149308a1f8c1a371f503edb91d1 (patch)
treedafbdc3a20ad07f24ee92c4583e3e84ecf01ab02 /src/CMakeLists.txt
parentexternals: microprofile: Eliminate variable shadowing (diff)
downloadyuzu-efc89c032b18d149308a1f8c1a371f503edb91d1.tar.gz
yuzu-efc89c032b18d149308a1f8c1a371f503edb91d1.tar.xz
yuzu-efc89c032b18d149308a1f8c1a371f503edb91d1.zip
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.txt5
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)
65 /we4305 # 'context': truncation from 'type1' to 'type2' 65 /we4305 # 'context': truncation from 'type1' to 'type2'
66 /we4388 # 'expression': signed/unsigned mismatch 66 /we4388 # 'expression': signed/unsigned mismatch
67 /we4389 # 'operator': signed/unsigned mismatch 67 /we4389 # 'operator': signed/unsigned mismatch
68 /we4456 # Declaration of 'identifier' hides previous local declaration
69 /we4457 # Declaration of 'identifier' hides function parameter
70 /we4458 # Declaration of 'identifier' hides class member
71 /we4459 # Declaration of 'identifier' hides global declaration
68 /we4505 # 'function': unreferenced local function has been removed 72 /we4505 # 'function': unreferenced local function has been removed
69 /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect 73 /we4547 # 'operator': operator before comma has no effect; expected operator with side-effect
70 /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'? 74 /we4549 # 'operator1': operator before comma has no effect; did you intend 'operator2'?
@@ -92,6 +96,7 @@ else()
92 -Werror=missing-declarations 96 -Werror=missing-declarations
93 -Werror=missing-field-initializers 97 -Werror=missing-field-initializers
94 -Werror=reorder 98 -Werror=reorder
99 -Werror=shadow
95 -Werror=sign-compare 100 -Werror=sign-compare
96 -Werror=switch 101 -Werror=switch
97 -Werror=uninitialized 102 -Werror=uninitialized