From ad551e765d39fb8003283b3efa08191e7144114d Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 17 Jan 2023 20:56:22 +0200 Subject: [PATCH 33/33] Meson: Enable -Wshadow for debug builds See osdn #46537 Signed-off-by: Marko Lindqvist --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e3d59b38e5..31dcf56628 100644 --- a/meson.build +++ b/meson.build @@ -80,7 +80,10 @@ endif if get_option('debug') priv_conf_data.set('FREECIV_DEBUG', 1) pub_conf_data.set('FREECIV_DEBUG', 1) - add_global_arguments('-Werror', language: ['c', 'cpp']) + add_global_arguments( + '-Werror', + '-Wshadow', + language: ['c', 'cpp']) if host_system == 'windows' # Qt headers have problems with dllimport attributes add_global_arguments('-Wno-error=attributes', language : 'cpp') -- 2.39.0