diff options
Diffstat (limited to 'contrib/checkSpace.pl')
-rwxr-xr-x | contrib/checkSpace.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl index cdbfb79077..e0b9d6b93b 100755 --- a/contrib/checkSpace.pl +++ b/contrib/checkSpace.pl @@ -82,14 +82,15 @@ for $fn (@ARGV) { } } ## Warn about functions not declared at start of line. - if ($in_func_head || ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && - ! /^(?:static )?(?:typedef|struct|union)/ && - ! /= *\{$/ && ! /;$/)) { + if ($in_func_head || + ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && + ! /^(?:static )?(?:typedef|struct|union)[^\(]*$/ && + ! /= *\{$/ && ! /;$/)) { if (/.\{$/){ print "fn() {:$fn:$.\n"; $in_func_head = 0; - } elsif (/^\S[^\(]* +[a-zA-Z0-9_]+\(/) { + } elsif (/^\S[^\(]* +\**[a-zA-Z0-9_]+\(/) { $in_func_head = -1; # started with tp fn } elsif (/;$/) { $in_func_head = 0; |