Messages in this thread Patch in this message |  | | | From | Andy Whitcroft <> | | Subject | [PATCH 2/7] checkpatch: suppress errors triggered by short patch | | Date | Tue, 2 Sep 2008 18:25:09 +0100 |
| |
When the last hunk of a patch is short it will trigger errors from checkpatch:
Use of uninitialized value in pattern match (m//) at /usr/local/bin/checkpatch.pl line 394. Use of uninitialized value in concatenation (.) or string at /usr/local/bin/checkpatch.pl line 397. Use of uninitialized value in pattern match (m//) Avoid touching beyond the last line. Reported by Julien Brunel.
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: Julien Brunel <brunel@diku.dk> --- scripts/checkpatch.pl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 457f874..5382f72 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -408,6 +408,7 @@ sub ctx_statement_block { # context. if ($off >= $len) { for (; $remain > 0; $line++) { + last if (!defined $lines[$line]); next if ($lines[$line] =~ /^-/); $remain--; $loff = $len; -- 1.6.0.rc1.258.g80295
|  |