From 3b14356fa0a23521b65b2885fa7704065fa884c1 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Tue, 24 Jul 2018 00:28:37 +0930 Subject: checkpatch: Fix unescaped brace warning 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 Signed-off-by: Joel Stanley --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/checkpatch.pl') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 24831b3166..d38369638c 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 {/; } } -- cgit v1.2.1