add check for static function names
This commit is contained in:
parent
27b3ffc627
commit
8f433f1a36
@ -54,6 +54,11 @@ sub check_source {
|
||||
push @{$troubles->{unwanted_strcmp}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bstrcmp\s*\(/;
|
||||
push @{$troubles->{unwanted_clock}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bclock\s*\(/;
|
||||
push @{$troubles->{unwanted_qsort}}, $lineno if $file =~ /^src\/.*\.c$/ && $l =~ /\bqsort\s*\(/;
|
||||
if ($file =~ m|src/.*\.c$| &&
|
||||
$file !~ m|src/math/.+_desc.c$| &&
|
||||
$l =~ /^static\s+\S+\s+([^_][a-zA-Z0-9_]+)\s*\(/) {
|
||||
push @{$troubles->{staticfunc_name}}, "$lineno($1)";
|
||||
}
|
||||
$lineno++;
|
||||
}
|
||||
for my $k (sort keys %$troubles) {
|
||||
|
Loading…
Reference in New Issue
Block a user