From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbeB0CYv (ORCPT ); Mon, 26 Feb 2018 21:24:51 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60073 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbeB0CYs (ORCPT ); Mon, 26 Feb 2018 21:24:48 -0500 X-ME-Sender: From: "Tobin C. Harding" To: Andrew Morton Cc: "Tobin C. Harding" , Joe Perches , Andy Whitcroft , linux-kernel@vger.kernel.org Subject: [PATCH v3 2/4] checkpatch: remove unused variable declarations Date: Tue, 27 Feb 2018 13:24:21 +1100 Message-Id: <1519698263-17783-3-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519698263-17783-1-git-send-email-me@tobin.cc> References: <1519698263-17783-1-git-send-email-me@tobin.cc> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variables are declared and not used, we should remove them. Signed-off-by: Tobin C. Harding --- scripts/checkpatch.pl | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 235a02f4f4e1..d505fa4ec20c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6081,7 +6081,6 @@ sub process { } if ($r1 !~ /^sizeof\b/ && $r2 =~ /^sizeof\s*\S/ && !($r1 =~ /^$Constant$/ || $r1 =~ /^[A-Z_][A-Z0-9_]*$/)) { - my $ctx = ''; my $herectx = $here . "\n"; my $cnt = statement_rawlines($stat); for (my $n = 0; $n < $cnt; $n++) { @@ -6169,7 +6168,6 @@ sub process { if ($^V && $^V ge 5.10.0 && defined $stat && $stat =~ /^\+[$;\s]*(?:case[$;\s]+\w+[$;\s]*:[$;\s]*|)*[$;\s]*\bdefault[$;\s]*:[$;\s]*;/g) { - my $ctx = ''; my $herectx = $here . "\n"; my $cnt = statement_rawlines($stat); for (my $n = 0; $n < $cnt; $n++) { -- 2.7.4