make find-doc-nits report function typedef w/ space before arg list
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Sat, 21 Dec 2019 19:42:10 +0000 (20:42 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 13 Jan 2020 12:28:18 +0000 (12:28 +0000)
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10673)

util/find-doc-nits

index b9c72803a1c3c283a4c5e32af4acd45b421d6f65..773214c94da6bd6899c0adc186beede69b79f649 100755 (executable)
@@ -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;