Fix the off-by-one in the suppression of lines in a statement block. This means that for multiple line statements like foo(bar, baz, qux); $stat has been inspected first correctly for the entire statement, and subsequently incorrectly just for qux); This fix will help make tracking appropriate indentation a little easier.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -3219,7 +3219,7 @@ sub process { · 3218 unmodified lines | |||
| 3219 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next, | 3219 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next, |
| 3220 | $realline_next); | 3220 | $realline_next); |
| 3221 | #print "LINE<$line>\n"; | 3221 | #print "LINE<$line>\n"; |
| 3222 | if ($linenr >= $suppress_statement && | 3222 | if ($linenr > $suppress_statement && |
| 3223 | $realcnt && $sline =~ /.\s*\S/) { | 3223 | $realcnt && $sline =~ /.\s*\S/) { |
| 3224 | ($stat, $cond, $line_nr_next, $remain_next, $off_next) = | 3224 | ($stat, $cond, $line_nr_next, $remain_next, $off_next) = |
| 3225 | ctx_statement_block($linenr, $realcnt, 0); | 3225 | ctx_statement_block($linenr, $realcnt, 0); |