[PATCH u-boot 1/4] checkpatch: Fix unescaped brace warning
Andrew Jeffery
andrew at aj.id.au
Tue Jul 24 00:58:37 AEST 2018
Running checkpatch using Ubuntu 18.04's packaged perl
(5.26.1-6ubuntu0.1) gave the following output:
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 3267
Escape the brace to avoid the warning.
Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 24831b3166e2..d38369638c6a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3264,7 +3264,7 @@ sub process {
if (ERROR("SPACING",
"space required before the open brace '{'\n" . $herecurr) &&
$fix) {
- $fixed[$linenr - 1] =~ s/^(\+.*(?:do|\))){/$1 {/;
+ $fixed[$linenr - 1] =~ s/^(\+.*(?:do|\)))\{/$1 {/;
}
}
--
2.17.1
More information about the openbmc
mailing list