From 9f567cc140bdbd7dc1db8efa76cd93862000c218 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 28 Jul 2020 12:18:11 +0100 Subject: meson: Enable shadowed variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shadowing variables can lead to unexpected bugs where a code path utilises a variable that may not have been intended by the developer, leading to hard to find bugs. Enable warnings for shadowed variables as defined at: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow As an effect of utilising -Werror, this will cause variable or type shadowing to become a build-time error. Suggested-by: Laurent Pinchart Signed-off-by: Kieran Bingham Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- meson.build | 1 + 1 file changed, 1 insertion(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index b0c17d3e..e6f6c84a 100644 --- a/meson.build +++ b/meson.build @@ -38,6 +38,7 @@ if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOUR endif common_arguments = [ + '-Wshadow', '-include', 'config.h', ] -- cgit v1.2.1