提交 3fb4bdab 编写于 作者: R Rich Salz 提交者: Dr. Matthias St. Pierre

Ignore duplicated undocumented things

Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NPaul Yang <yang.yang@baishancloud.com>

(cherry picked from commit ee4afacd96f5bfbe7662c8f0ec4464c6eee4c450)
Reviewed-by: NTomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
Reviewed-by: NMatthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10094)
上级 ac8881e1
...@@ -35,7 +35,7 @@ Find small errors (nits) in documentation. Options: ...@@ -35,7 +35,7 @@ Find small errors (nits) in documentation. Options:
-l Print bogus links -l Print bogus links
-n Print nits in POD pages -n Print nits in POD pages
-p Warn if non-public name documented (implies -n) -p Warn if non-public name documented (implies -n)
-u List undocumented functions -u Count undocumented functions
-h Print this help message -h Print this help message
-c List undocumented commands and options -c List undocumented commands and options
EOF EOF
...@@ -294,6 +294,7 @@ my %docced; ...@@ -294,6 +294,7 @@ my %docced;
sub checkmacros() sub checkmacros()
{ {
my $count = 0; my $count = 0;
my %seen;
print "# Checking macros (approximate)\n"; print "# Checking macros (approximate)\n";
foreach my $f ( glob('include/openssl/*.h') ) { foreach my $f ( glob('include/openssl/*.h') ) {
...@@ -305,7 +306,7 @@ sub checkmacros() ...@@ -305,7 +306,7 @@ sub checkmacros()
while ( <IN> ) { while ( <IN> ) {
next unless /^#\s*define\s*(\S+)\(/; next unless /^#\s*define\s*(\S+)\(/;
my $macro = $1; my $macro = $1;
next if $docced{$macro}; next if $docced{$macro} || defined $seen{$macro};
next if $macro =~ /i2d_/ next if $macro =~ /i2d_/
|| $macro =~ /d2i_/ || $macro =~ /d2i_/
|| $macro =~ /DEPRECATEDIN/ || $macro =~ /DEPRECATEDIN/
...@@ -313,6 +314,7 @@ sub checkmacros() ...@@ -313,6 +314,7 @@ sub checkmacros()
|| $macro =~ /DECLARE_/; || $macro =~ /DECLARE_/;
print "$f:$macro\n" if $opt_d; print "$f:$macro\n" if $opt_d;
$count++; $count++;
$seen{$macro} = 1;
} }
close(IN); close(IN);
} }
...@@ -324,15 +326,17 @@ sub printem() ...@@ -324,15 +326,17 @@ sub printem()
my $libname = shift; my $libname = shift;
my $numfile = shift; my $numfile = shift;
my $count = 0; my $count = 0;
my %seen;
foreach my $func ( &parsenum($numfile) ) { foreach my $func ( &parsenum($numfile) ) {
next if $docced{$func}; next if $docced{$func} || defined $seen{$func};
# Skip ASN1 utilities # Skip ASN1 utilities
next if $func =~ /^ASN1_/; next if $func =~ /^ASN1_/;
print "$libname:$func\n" if $opt_d; print "$libname:$func\n" if $opt_d;
$count++; $count++;
$seen{$func} = 1;
} }
print "# Found $count missing from $numfile\n\n"; print "# Found $count missing from $numfile\n\n";
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册