From 8f433f1a364e8401eeb864e705853c7088fce695 Mon Sep 17 00:00:00 2001
From: Karel Miko <karel.miko@gmail.com>
Date: Tue, 20 Jun 2017 19:22:15 +0200
Subject: [PATCH] add check for static function names

---
 helper.pl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/helper.pl b/helper.pl
index ab41a51..3f7202f 100755
--- a/helper.pl
+++ b/helper.pl
@@ -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) {