From efc89c032b18d149308a1f8c1a371f503edb91d1 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Thu, 26 May 2022 20:08:21 -0400 Subject: 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. --- src/core/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/core/CMakeLists.txt') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 2bd720f08..670410e75 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -743,16 +743,11 @@ if (MSVC) /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data /we4245 # 'conversion': conversion from 'type1' to 'type2', signed/unsigned mismatch /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data - /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 ) else() target_compile_options(core PRIVATE -Werror=conversion -Werror=ignored-qualifiers - -Werror=shadow $<$:-Werror=class-memaccess> $<$:-Werror=unused-but-set-parameter> -- cgit v1.2.3