From: Dr. David von Oheimb Date: Sat, 21 Dec 2019 19:42:10 +0000 (+0100) Subject: make find-doc-nits report function typedef w/ space before arg list X-Git-Tag: openssl-3.0.0-alpha1~695 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28104cdda3f1272e3e41f6eec2b5bff9f4fc162e;p=thirdparty%2Fopenssl.git make find-doc-nits report function typedef w/ space before arg list Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10673) --- diff --git a/util/find-doc-nits b/util/find-doc-nits index b9c72803a1c..773214c94da 100755 --- a/util/find-doc-nits +++ b/util/find-doc-nits @@ -144,6 +144,11 @@ sub name_synopsis { $line =~ s/STACK_OF\([^)]+\)/int/g; $line =~ s/SPARSE_ARRAY_OF\([^)]+\)/int/g; $line =~ s/__declspec\([^)]+\)//; + if ( $line =~ /typedef.*\(\*\S+\)\s+\(/ ) { + # a callback function with whitespace before the argument list: + # typedef ... (*NAME) (... + err($id, "function typedef has space before arg list: $line"); + } if ( $line =~ /env (\S*)=/ ) { # environment variable env NAME=... $sym = $1;