X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=util%2Fck_errf.pl;h=fd6becc423f0a33149e089fc27adc3b7a7754b8a;hp=7a24d6c5a2e2909b7d0aff27e876933636d3d428;hb=48fd490c6d3c0e5dcfb2f2464ce84adb6bc3ec7e;hpb=dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c diff --git a/util/ck_errf.pl b/util/ck_errf.pl index 7a24d6c5a2..fd6becc423 100755 --- a/util/ck_errf.pl +++ b/util/ck_errf.pl @@ -13,16 +13,21 @@ foreach $file (@ARGV) $func=""; while () { - if (/^[a-zA-Z].+[\s*]([A-Za-z_0-9]+)\(.*\)/) + if (!/;$/ && /^([a-zA-Z].*[\s*])?([A-Za-z_0-9]+)\(.*[),]/) { - $func=$1; + /^([^()]*(\([^()]*\)[^()]*)*)\(/; + $1 =~ /([A-Za-z_0-9]*)$/; + $func = $1; $func =~ tr/A-Z/a-z/; } - if (/([A-Z0-9]+)err\(([^,]+)/) + if (/([A-Z0-9]+)err\(([^,]+)/ && ! /ckerr_ignore/) { - next if ($func eq ""); $errlib=$1; $n=$2; + + if ($func eq "") + { print "$file:$.:???:$n\n"; next; } + if ($n !~ /([^_]+)_F_(.+)$/) { # print "check -$file:$.:$func:$n\n"; @@ -32,7 +37,7 @@ foreach $file (@ARGV) $n=$2; if ($lib ne $errlib) - { print "$file:$.:$func:$n\n"; next; } + { print "$file:$.:$func:$n [${errlib}err]\n"; next; } $n =~ tr/A-Z/a-z/; if (($n ne $func) && ($errlib ne "SYS"))