checkpatch.pl: fix the perl warning

Used to get the below warning:
`
Running coding guidelines check ...
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 ./build-aux/checkpatch.pl line 3102.
`

But as per the recommendation in perl document, we should escape the braces.

While this check should be removed from the codebase when we get the 'codingstandard' automated scripts, we can keep the code warning free at least till then.

updates: bz#1193929
Change-Id: I236a428174b5d16ca41baa03e96bc7aa26177b5b
Signed-off-by: Amar Tumballi <amarts@redhat.com>
This commit is contained in:
Amar Tumballi 2018-07-03 11:47:31 +05:30
parent 99a1e816ce
commit 340500cc95

View File

@ -3099,7 +3099,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 {/;
}
}