Messages in this thread Patch in this message | | | Date | Thu, 1 May 2008 13:09:58 +0100 | From | Andy Whitcroft <> | Subject | Re: [PATCH] update checkpatch.pl to version 0.19 |
| |
> return is not a function
Bah, no matter how much testing you do something always slips through. This one is false triggering enough to warrent a fix.
Andrew, please suck this one up on top.
-apw
=== 8< === return is not a function -- tighten test
Tighten the return is not a function test so that we only report it on the line it occurs.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
--- diff --git a/checkpatch.pl b/checkpatch.pl index cc9cd7c..66f060e 100755 --- a/checkpatch.pl +++ b/checkpatch.pl @@ -1665,7 +1665,7 @@ sub process { } # Return is not a function. - if (defined($stat) && $stat =~ /\breturn(\s*)(\(.*);/s) { + if (defined($stat) && $stat =~ /^.\s*return(\s*)(\(.*);/s) { my $spacing = $1; my $value = $2;
| |