checkpatch: fix braces {} handling

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>
This commit is contained in:
Pavel Borzenkov 2011-08-26 17:34:37 +04:00 committed by Blue Swirl
parent 8733f6093c
commit 01c4330b58
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}