Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346422
b: refs/heads/master
c: d1e2ad0
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Dec 18, 2012
1 parent 064d143 commit a5b97e8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88982fea52d0115d44b77619afef576f24cdb844
refs/heads/master: d1e2ad07e78c4bbac9fce4d2e3c0fe60bce091d8
18 changes: 16 additions & 2 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3448,8 +3448,22 @@ sub process {

# check for multiple semicolons
if ($line =~ /;\s*;\s*$/) {
WARN("ONE_SEMICOLON",
"Statements terminations use 1 semicolon\n" . $herecurr);
WARN("ONE_SEMICOLON",
"Statements terminations use 1 semicolon\n" . $herecurr);
}

# check for switch/default statements without a break;
if ($^V && $^V ge 5.10.0 &&
defined $stat &&
$stat =~ /^\+[$;\s]*(?:case[$;\s]+\w+[$;\s]*:[$;\s]*|)*[$;\s]*\bdefault[$;\s]*:[$;\s]*;/g) {
my $ctx = '';
my $herectx = $here . "\n";
my $cnt = statement_rawlines($stat);
for (my $n = 0; $n < $cnt; $n++) {
$herectx .= raw_line($linenr, $n) . "\n";
}
WARN("DEFAULT_NO_BREAK",
"switch default: should use break\n" . $herectx);
}

# check for gcc specific __FUNCTION__
Expand Down

0 comments on commit a5b97e8

Please sign in to comment.