From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C671AA00C5; Mon, 6 Jul 2020 10:01:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C78721D699; Mon, 6 Jul 2020 10:00:51 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id C44B91D5B0 for ; Mon, 6 Jul 2020 10:00:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594022450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H4EBp0tR/nCw11Y/Pt0sg7hY8ILj60LXCIJfdrCW+pE=; b=GAStuOVqeuSaoQ4uF4lRoAZVdCdGyqavjdc4UpssxGdou0tWJooaTLw9bldhgfA+WPfqXH EAdyAAdMMdmfjKtjydS0ALcW48yovpXSxV53Y61PhWMUQMJnxtzuEd69c5zYcOXArfr+pY MKW2Y2LsxvyIP6J7zq95oKN6FBiGI44= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-495-VJzYY9oMNk6eqrZj8JP8Fw-1; Mon, 06 Jul 2020 04:00:48 -0400 X-MC-Unique: VJzYY9oMNk6eqrZj8JP8Fw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B0B5107ACF8; Mon, 6 Jul 2020 08:00:47 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.195.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08E54275E36; Mon, 6 Jul 2020 08:00:45 +0000 (UTC) From: David Marchand To: dev@dpdk.org, thomas@monjalon.net Date: Mon, 6 Jul 2020 10:00:22 +0200 Message-Id: <20200706080022.3887-2-david.marchand@redhat.com> In-Reply-To: <20200706080022.3887-1-david.marchand@redhat.com> References: <20200706080022.3887-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/2] devtools: fix forbidden token X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" An expression with a space is split by the awk script resulting in false positive for any patch matching any of the two part of the expression. Fix this by using [[:space:]]. Fixes: 43e73483a4b8 ("devtools: forbid variable declaration inside for") Signed-off-by: David Marchand --- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 27ab1252b7..58021aa5dd 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -71,7 +71,7 @@ check_forbidden_additions() { # # forbid variable declaration inside "for" loop awk -v FOLDERS='.' \ - -v EXPRESSIONS='for *\\((char|u?int|unsigned|s?size_t)' \ + -v EXPRESSIONS='for[[:space:]]*\\((char|u?int|unsigned|s?size_t)' \ -v RET_ON_FAIL=1 \ -v MESSAGE='Declaring a variable inside for()' \ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ -- 2.23.0