From eeae5217ba6572e8dfb91550ea9f30413c6786b8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 16 May 2021 01:46:30 -0400 Subject: core: Make variable shadowing a compile-time error Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely. --- src/core/file_sys/vfs_libzip.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/core/file_sys/vfs_libzip.cpp') diff --git a/src/core/file_sys/vfs_libzip.cpp b/src/core/file_sys/vfs_libzip.cpp index 429d7bc8b9..618eb658a6 100644 --- a/src/core/file_sys/vfs_libzip.cpp +++ b/src/core/file_sys/vfs_libzip.cpp @@ -3,7 +3,16 @@ // Refer to the license.txt file included. #include + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wshadow" +#endif #include +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + #include "common/logging/backend.h" #include "core/file_sys/vfs.h" #include "core/file_sys/vfs_libzip.h" -- cgit v1.2.3