I remember that `sparse' used to warn about shadowed variables but it seems not to do it by default anymore. It was useful.
Enable `-Wshadow' while invoking sparse. Cc: linux-spa...@vger.kernel.org Cc: Masahiro Yamada <yamada.masah...@socionext.com> Cc: Michal Marek <michal.l...@markovi.net> Cc: linux-kbu...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bige...@linutronix.de> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf3786e4ffece..0160c6b5dd45d 100644 --- a/Makefile +++ b/Makefile @@ -390,7 +390,7 @@ PYTHON3 = python3 CHECK = sparse CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ - -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) + -Wbitwise -Wno-return-void -Wno-unknown-attribute -Wshadow $(CF) NOSTDINC_FLAGS = CFLAGS_MODULE = AFLAGS_MODULE = -- 2.19.1