We are allowing context scanning checks to apply against the first line of context outside at the end of the hunk. This can lead to false matches to patch names leading to various perl warnings. Correctly stop at the bottom of the hunk.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -1234,7 +1234,6 @@ sub process { · 1233 unmodified lines | ||
| 1234 | 1234 | $linenr++; |
| 1235 | 1235 | |
| 1236 | 1236 | my $rawline = $rawlines[$linenr - 1]; |
| 1237 | − my $hunk_line = ($realcnt != 0); | |
| 1238 | 1237 | |
| 1239 | 1238 | #extract the line range in the file after the patch is applied |
| 1240 | 1239 | if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) { |
| @@ -1274,6 +1273,8 @@ sub process { · 33 unmodified lines | ||
| 1274 | 1273 | $realcnt--; |
| 1275 | 1274 | } |
| 1276 | 1275 | |
| 1276 | + my $hunk_line = ($realcnt != 0); | |
| 1277 | + | |
| 1277 | 1278 | #make up the handle for any error we report on this line |
| 1278 | 1279 | $prefix = "$filename:$realline: " if ($emacs && $file); |
| 1279 | 1280 | $prefix = "$filename:$linenr: " if ($emacs && !$file); |