projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8733f60
)
checkpatch: fix braces {} handling
author
Pavel Borzenkov
<pavel.borzenkov@gmail.com>
Fri, 26 Aug 2011 13:34:37 +0000
(17:34 +0400)
committer
Blue Swirl
<blauwirbel@gmail.com>
Sat, 27 Aug 2011 15:44:16 +0000
(15:44 +0000)
checkpatch.pl doesn't report warning for if/else statements with missing
'else' braces:
if (something) {
foo;
} else
bar;
The patch has been tested using the last 100 commits.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
scripts/checkpatch.pl
patch
|
blob
|
history
diff --git
a/scripts/checkpatch.pl
b/scripts/checkpatch.pl
index 3498425fff68fe48292df2115177deb97e3bbb3d..0eba357cc2105be70a7738601be552801bc5b5bd 100755
(executable)
--- a/
scripts/checkpatch.pl
+++ b/
scripts/checkpatch.pl
@@
-2532,7
+2532,7
@@
sub process {
$allowed = 1;
}
}
- if (
!$seen
) {
+ if (
$seen != ($#chunks + 1)
) {
WARN("braces {} are necessary for all arms of this statement\n" . $herectx);
}
}