]> Git Repo - linux.git/commit - scripts/checkpatch.pl
checkpatch: add --strict test for switch/default missing break
authorJoe Perches <[email protected]>
Tue, 18 Dec 2012 00:02:01 +0000 (16:02 -0800)
committerLinus Torvalds <[email protected]>
Tue, 18 Dec 2012 01:15:19 +0000 (17:15 -0800)
commitd1e2ad07e78c4bbac9fce4d2e3c0fe60bce091d8
tree41193684d79788aef5d00c817ba570c27c7de02f
parent88982fea52d0115d44b77619afef576f24cdb844
checkpatch: add --strict test for switch/default missing break

switch default case is sometimes written as "default:;".  This can cause
new cases added below the default to be defective.

Suggest adding a break; after empty default cases to avoid fallthrough
defects.

Fixed indentation in the other semicolon test above it.

Suggested-by: Peter Senna Tschudin <[email protected]>
Signed-off-by: Joe Perches <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
scripts/checkpatch.pl
This page took 0.04351 seconds and 4 git commands to generate.