As of perl 5, version 26, subversion 0 (v5.26.0) some new warnings have occurred when running checkpatch. Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.\s*){ <-- HERE \s*/ at scripts/checkpatch.pl line 3544. Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(.\s*){ <-- HERE \s*/ at scripts/checkpatch.pl line 3885. Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/^(\+.*(?:do|\))){ <-- HERE / at scripts/checkpatch.pl line 4374. It seems perfectly reasonable to do as the warning suggests and simply escape the left brace in these three locations.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -3555,7 +3555,7 @@ sub process { · 3554 unmodified lines | ||
| 3555 | 3555 | $fixedline =~ s/\s*=\s*$/ = {/; |
| 3556 | 3556 | fix_insert_line($fixlinenr, $fixedline); |
| 3557 | 3557 | $fixedline = $line; |
| 3558 | − $fixedline =~ s/^(.\s*){\s*/$1/; | |
| 3558 | + $fixedline =~ s/^(.\s*)\{\s*/$1/; | |
| 3559 | 3559 | fix_insert_line($fixlinenr, $fixedline); |
| 3560 | 3560 | } |
| 3561 | 3561 | } |
| @@ -3896,7 +3896,7 @@ sub process { · 334 unmodified lines | ||
| 3896 | 3896 | my $fixedline = rtrim($prevrawline) . " {"; |
| 3897 | 3897 | fix_insert_line($fixlinenr, $fixedline); |
| 3898 | 3898 | $fixedline = $rawline; |
| 3899 | − $fixedline =~ s/^(.\s*){\s*/$1\t/; | |
| 3899 | + $fixedline =~ s/^(.\s*)\{\s*/$1\t/; | |
| 3900 | 3900 | if ($fixedline !~ /^\+\s*$/) { |
| 3901 | 3901 | fix_insert_line($fixlinenr, $fixedline); |
| 3902 | 3902 | } |
| @@ -4385,7 +4385,7 @@ sub process { · 482 unmodified lines | ||
| 4385 | 4385 | if (ERROR("SPACING", |
| 4386 | 4386 | "space required before the open brace '{'\n" . $herecurr) && |
| 4387 | 4387 | $fix) { |
| 4388 | − $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\))){/$1 {/; | |
| 4388 | + $fixed[$fixlinenr] =~ s/^(\+.*(?:do|\)))\{/$1 {/; | |
| 4389 | 4389 | } |
| 4390 | 4390 | } |
| 4391 | 4391 | |