From: "Geyslan G. Bem" <geyslan@gmail.com>
To: peter.senna@gmail.com
Cc: "Geyslan G. Bem" <geyslan@gmail.com>,
Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] checkpatch: fix left brace warning
Date: Wed, 30 Dec 2015 12:49:31 -0300 [thread overview]
Message-ID: <1451490572-10096-1-git-send-email-geyslan@gmail.com> (raw)
This patch escapes a regex that uses left brace.
Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped
left brace in regex is deprecated, passed through in regex;"
Comment from regcomp.c in Perl source: "Currently we don't warn when the
lbrace is at the start of a construct. This catches it in the middle of
a literal string, or when it's the first thing after something like
"\b"."
This works as a complement to 4e5d56bd.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d4960f7..3e11a30 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4108,7 +4108,7 @@ sub process {
## }
#need space before brace following if, while, etc
- if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
+ if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
$line =~ /do\{/) {
if (ERROR("SPACING",
"space required before the open brace '{'\n" . $herecurr) &&
--
2.6.4
next reply other threads:[~2015-12-30 15:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 15:49 Geyslan G. Bem [this message]
2016-01-26 14:50 ` [PATCH] checkpatch: fix left brace warning Geyslan G. Bem
-- strict thread matches above, loose matches on Subject: below --
2015-08-05 21:28 [PATCH] checkpatch: Fix " Eddie Kovsky
2015-08-06 19:37 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1451490572-10096-1-git-send-email-geyslan@gmail.com \
--to=geyslan@gmail.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.senna@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox