From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com
Subject: [Qemu-devel] [PATCH] checkpatch: Perl 5.22 deprecation fixes
Date: Fri, 4 Sep 2015 16:45:59 +0200 [thread overview]
Message-ID: <1441377959-27604-1-git-send-email-kbastian@mail.uni-paderborn.de> (raw)
Perl 5.22 has deprecated unescaped { inside a regexp, resulting in
warnings:
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at scripts/checkpatch.pl line 3523.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at scripts/checkpatch.pl line 4035.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at scripts/checkpatch.pl line 4036.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at scripts/checkpatch.pl line 4483.
A fix in kernel can be found here: https://lkml.org/lkml/2015/7/8/1049. Since we diverged a bit from the kernel, I only fixed the warnings I could find.
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
scripts/checkpatch.pl | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7f0aae9..6b129e9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1936,8 +1936,8 @@ 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=~/}/)) {
+ if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and
+ !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
ERROR("open brace '{' following function declarations go on the next line\n" . $herecurr);
}
@@ -2091,7 +2091,7 @@ sub process {
# not required when having a single },{ on one line
} elsif ($op eq ',') {
if ($ctx !~ /.x[WEC]/ && $cc !~ /^}/ &&
- ($elements[$n] . $elements[$n + 2]) !~ " *}{") {
+ ($elements[$n] . $elements[$n + 2]) !~ " *}\\{") {
ERROR("space required after that '$op' $at\n" . $hereptr);
}
@@ -2211,8 +2211,8 @@ sub process {
## }
#need space before brace following if, while, etc
- if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
- $line =~ /do{/) {
+ if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
+ $line =~ /do\{/) {
ERROR("space required before the open brace '{'\n" . $herecurr);
}
--
2.5.1
reply other threads:[~2015-09-04 14:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1441377959-27604-1-git-send-email-kbastian@mail.uni-paderborn.de \
--to=kbastian@mail.uni-paderborn.de \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).