Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1299411
| From | "Geyslan G. Bem" <geyslan@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] checkpatch: fix left brace warning |
| Date | 2015-12-30 17:00 +0100 |
| Message-ID | <qLrkm-61-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
--
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 | Find similar | Unroll thread
[PATCH] checkpatch: fix left brace warning "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-30 17:00 +0100
csiph-web