On Fri, 2017-06-16 at 17:29 +0200, Markus Heiser wrote: > > This has the same problem as all the other versions proposed here - > > if you have > > > > enum foo { > > X, > > > > Y, > > }; > > > > (note the blank line) > > > > you'll get > > > > warning: Enum value ' ' not described in enum 'foo' > > Aargh, sorry .. I need glasses. The LinuxDoc parser works with the > patch, I guess the dump_enum is different in the Perl script (seems > not stripping leading whitespaces from the concatenated string) ... > the following works for me: > > modified scripts/kernel-doc > @@ -2223,6 +2223,7 @@ sub dump_enum($$) { > if ($x =~ /enum\s+(\w+)\s*{(.*)}/) { > $declaration_name = $1; > my $members = $2; > + $members =~ s/\s+$//; > > foreach my $arg (split ',', $members) { > $arg =~ s/^\s*(\w+).*/$1/; > @@ -2763,6 +2764,9 @@ sub process_proto_type($$) { > > while (1) { > if ( $x =~ /([^{};]*)([{};])(.*)/ ) { > + if( length $prototype ) { > + $prototype .= " " > + } > $prototype .= $1 . $2; > ($2 eq '{') && $brcount++; > ($2 eq '}') && $brcount--; [...] > Can you test it with some of your constructs? / Thanks! Yep, works for me on my iwlwifi documentation where I originally found the problem. I hope you'll submit a patch, so here's my Tested-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Thanks a lot! johannes -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html