diff options
author | Paul Fertser <fercerpav@gmail.com> | 2016-02-06 16:30:10 +0300 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2016-05-05 21:02:37 +0100 |
commit | 18a6fdc154ed61c641e2238c0f0ea6af0331c248 (patch) | |
tree | caf951cbe956dd415af77b16ef9852eab669cb76 /tools | |
parent | a8d302f9abe6bbb5daceafaeae7cdb1804d14d59 (diff) | |
download | riscv-openocd-18a6fdc154ed61c641e2238c0f0ea6af0331c248.zip riscv-openocd-18a6fdc154ed61c641e2238c0f0ea6af0331c248.tar.gz riscv-openocd-18a6fdc154ed61c641e2238c0f0ea6af0331c248.tar.bz2 |
checkpatch.pl: fix unescaped left brace warnings
Basically, same as upstream 4e5d56bdf892e18832a6540b63ebf709966bce2a.
Unescaped left brace in string literals is deprecated since
perl v5.21.1.
Change-Id: I0e5f23bef821d2dca6ff4909ddbb06f4992718d4
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/3228
Tested-by: jenkins
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/scripts/checkpatch.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index 4eb50c3..92befc6 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -2225,7 +2225,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=~/}/)) { ERROR("OPEN_BRACE", "open brace '{' following function declarations go on the next line\n" . $herecurr); } @@ -2493,8 +2493,8 @@ sub process { ## } #need space before brace following if, while, etc - if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) || - $line =~ /do{/) { + if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) || + $line =~ /do\{/) { ERROR("SPACING", "space required before the open brace '{'\n" . $herecurr); } |