From a085f43fc47cbc38567a0141af1c0718b1885de1 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Wed, 3 Jan 2018 01:07:57 +0800 Subject: [PATCH] Enforce return values section check To avoid check failure, make dummy RETURN VALUES sections in the docs which have no real functions decribed inside... Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/4976) --- doc/man3/OPENSSL_Applink.pod | 4 ++++ doc/man3/OPENSSL_ia32cap.pod | 4 ++++ util/find-doc-nits | 9 +++------ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/man3/OPENSSL_Applink.pod b/doc/man3/OPENSSL_Applink.pod index d3a461ba39..5c97d59279 100644 --- a/doc/man3/OPENSSL_Applink.pod +++ b/doc/man3/OPENSSL_Applink.pod @@ -19,6 +19,10 @@ compiler of their choice and link it into the target application. The referred module is available as F, located alongside the public header files (only on the platforms where applicable). +=head1 RETURN VALUES + +Not available. + =head1 COPYRIGHT Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved. diff --git a/doc/man3/OPENSSL_ia32cap.pod b/doc/man3/OPENSSL_ia32cap.pod index e4f5037588..b90eb3257c 100644 --- a/doc/man3/OPENSSL_ia32cap.pod +++ b/doc/man3/OPENSSL_ia32cap.pod @@ -151,6 +151,10 @@ the problem by making build procedure use following script: instead of real clang. In which case it doesn't matter which clang version is used, as it is GNU assembler version that will be checked. +=head1 RETURN VALUES + +Not available. + =head1 COPYRIGHT Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved. diff --git a/util/find-doc-nits b/util/find-doc-nits index 7087d366d2..8d580de045 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -24,7 +24,6 @@ our($opt_h); our($opt_l); our($opt_n); our($opt_p); -our($opt_s); our($opt_u); our($opt_c); @@ -35,7 +34,6 @@ Find small errors (nits) in documentation. Options: -d Detailed list of undocumented (implies -u) -l Print bogus links -n Print nits in POD pages - -s Also print missing sections in POD pages (implies -n) -p Warn if non-public name documented (implies -n) -u List undocumented functions -h Print this help message @@ -217,7 +215,6 @@ sub check() foreach ((@{$mandatory_sections{'*'}}, @{$mandatory_sections{$section}})) { # Skip "return values" if not -s - next if $_ eq 'RETURN VALUES' and not $opt_s; print "$id: missing $_ head1 section\n" if $contents !~ /^=head1\s+${_}\s*$/m; } @@ -474,13 +471,13 @@ sub checkflags() { return $ok; } -getopts('cdlnsphu'); +getopts('cdlnphu'); &help() if $opt_h; -$opt_n = 1 if $opt_s or $opt_p; +$opt_n = 1 if $opt_p; $opt_u = 1 if $opt_d; -die "Need one of -[cdlnspu] flags.\n" +die "Need one of -[cdlnpu] flags.\n" unless $opt_c or $opt_l or $opt_n or $opt_u; if ( $opt_c ) { -- 2.25.1