linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Fix perl 5.22 brace deprecation warnings
@ 2015-07-08 19:22 Stefan Tatschner
  2015-09-04  8:10 ` Stefan Tatschner
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Tatschner @ 2015-07-08 19:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andy Whitcroft, Joe Perches, Stefan Tatschner

This patch fixes four "Unescaped left brace in regex is
deprecated" (perl 5.22) warnings by escaping left braces
properly.

Signed-off-by: Stefan Tatschner <stefan@sevenbyte.org>
---
 scripts/checkpatch.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 89b1df4..fece920 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3407,7 +3407,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) {
@@ -3919,8 +3919,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) {
@@ -4367,7 +4367,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.4.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] checkpatch: Fix perl 5.22 brace deprecation warnings
  2015-07-08 19:22 [PATCH] checkpatch: Fix perl 5.22 brace deprecation warnings Stefan Tatschner
@ 2015-09-04  8:10 ` Stefan Tatschner
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Tatschner @ 2015-09-04  8:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andy Whitcroft, Joe Perches

On Mi, 2015-07-08 at 21:22 +0200, Stefan Tatschner wrote:
> This patch fixes four "Unescaped left brace in regex is
> deprecated" (perl 5.22) warnings by escaping left braces
> properly.
> 
> Signed-off-by: Stefan Tatschner <stefan@sevenbyte.org>

Are there any updates on this patch? It seems it got lost in the noise.
It fixes these deprecation warnings on perl 5.22.0:

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.

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-04  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 19:22 [PATCH] checkpatch: Fix perl 5.22 brace deprecation warnings Stefan Tatschner
2015-09-04  8:10 ` Stefan Tatschner

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).