From patchwork Wed Oct 17 17:05:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 10645959 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 751A8157A for ; Wed, 17 Oct 2018 17:06:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6474E28501 for ; Wed, 17 Oct 2018 17:06:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58EF2286FD; Wed, 17 Oct 2018 17:06:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14F432854A for ; Wed, 17 Oct 2018 17:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727837AbeJRBCj (ORCPT ); Wed, 17 Oct 2018 21:02:39 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:60773 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727678AbeJRBCj (ORCPT ); Wed, 17 Oct 2018 21:02:39 -0400 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1gCpGg-0003Ud-5x; Wed, 17 Oct 2018 19:05:58 +0200 From: Sebastian Andrzej Siewior To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, linux-kbuild@vger.kernel.org, Sebastian Andrzej Siewior , linux-sparse@vger.kernel.org, Masahiro Yamada , Michal Marek Subject: [PATCH 1/3] kbuild: Add -Wshadow to sparse Date: Wed, 17 Oct 2018 19:05:52 +0200 Message-Id: <20181017170554.18841-2-bigeasy@linutronix.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181017170554.18841-1-bigeasy@linutronix.de> References: <20181017170554.18841-1-bigeasy@linutronix.de> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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-sparse@vger.kernel.org Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- 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 =