Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1201156
| Path | csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Eddie Kovsky <ewk@edkovsky.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] checkpatch: Fix left brace warning |
| Date | Wed, 05 Aug 2015 23:40:02 +0200 |
| Message-ID | <pUezM-59o-33@gated-at.bofh.it> (permalink) |
| X-Original-To | Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>, linux-kernel@vger.kernel.org |
| X-Greylist | delayed 398 seconds by postgrey-1.27 at vger.kernel.org; Wed, 05 Aug 2015 17:34:59 EDT |
| X-Authority-Analysis | v=2.1 cv=OJm0g0qB c=1 sm=1 tr=0 a=PkLafpyMt2xwRD+PMJrZ3Q==:117 a=PkLafpyMt2xwRD+PMJrZ3Q==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=ptNznvi-AAAA:8 a=a-6OF32toJAA:10 a=kj9zAlcOel0A:10 a=fztpppUj2ZoA:10 a=Xwexni91U_8A:10 a=uRRa74qj2VoA:10 a=KSihe0nwYjyfxiN22jQA:9 a=CjuIK1q_8ugA:10 |
| Dkim-Signature | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=edkovsky.org; s=default; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=C798jsj2v/BA13WKbcSCy+IL78+0pHN8nNHVZdtEm+g=; b=FOtRgYEbjC8RtPuQBDWfVEI5FRvf8XDmrgd2nHKkgRjUcUPr6AEXCNt4B5vHW8vwmJb/RFsfAx2qGH/zGjkQjpQ5Xx/kS4VzvR1QZ7Tm0qfhsxzYWK+B4DqBnB4hh6PZ; |
| Mail-Followup-To | Eddie Kovsky <ewk@edkovsky.org>, Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>, linux-kernel@vger.kernel.org |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) |
| X-Identified-User | {1650:box492.bluehost.com:edkovsky:edkovsky.org} {sentby:smtp auth 65.102.196.57 authed with ewk+edkovsky.org} |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 53 |
| Organization | linux.* mail to news gateway |
| X-Original-Date | Wed, 5 Aug 2015 15:28:26 -0600 |
| X-Original-Message-ID | <20150805212826.GA22730@athena.Home> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1201156 |
Show key headers only | View raw
Using checkpatch.pl with Perl 5.22.0 generates the following warning:
Unescaped left brace in regex is deprecated, passed through in regex;
This patch fixes the warnings by escaping occurrences of the left brace
inside the regular expression.
Signed-off-by: Eddie Kovsky <ewk@edkovsky.org>
---
scripts/checkpatch.pl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 50693f52d57c..a38fa70ce694 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3547,7 +3547,7 @@ sub process {
# function brace can't be on same line, except for #defines of do while,
# or if closed on same line
if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
- !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
+ !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
if (ERROR("OPEN_BRACE",
"open brace '{' following function declarations go on the next line\n" . $herecurr) &&
$fix) {
@@ -4059,8 +4059,8 @@ sub process {
## }
#need space before brace following if, while, etc
- if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
- $line =~ /do{/) {
+ if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
+ $line =~ /do\{/) {
if (ERROR("SPACING",
"space required before the open brace '{'\n" . $herecurr) &&
$fix) {
@@ -4507,7 +4507,7 @@ sub process {
$dstat !~ /^for\s*$Constant$/ && # for (...)
$dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar()
$dstat !~ /^do\s*{/ && # do {...
- $dstat !~ /^\({/ && # ({...
+ $dstat !~ /^\(\{/ && # ({...
$ctx !~ /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/)
{
$ctx =~ s/\n*$//;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] checkpatch: Fix left brace warning Eddie Kovsky <ewk@edkovsky.org> - 2015-08-05 23:40 +0200 Re: [PATCH] checkpatch: Fix left brace warning Joe Perches <joe@perches.com> - 2015-08-06 21:40 +0200
csiph-web