On Thu, 4 Jan 2018, Francois-Xavier Le Bail wrote:
> On 04/01/2018 15:09, Julia Lawall wrote: > > > > > > On Thu, 4 Jan 2018, Francois-Xavier Le Bail wrote: > > > >> Hi, > >> > >> I got high badcounts with some sources. > > > > Actually, in this case there are just some parse errrors in the code. > > > > ND_PRINT((ndo, " from %s", etheraddr_string(... (line 302) > > This is missing one ) > > > > ND_PRINT((ndo, ", hops %d", EXTRACT_U_1(... (line 322) > > This has one ) too many. > > Bingo ! > > Thank you. > > Do you have an option or a tool to find these errors ? > Because neither gcc nor clang find them ! No. Actually the parser is built on the assumption that the code has been approved by the compiler. I'm really puzzled why gcc/clang did not complain. Perhaps the whole fils is just ifdefd out. I don't know why it didn't put BAD on some line, but I guess it was pretty disoriented. It already seems to have a special handling of macros that have a single argument that is an argument list, ie ND_PRINT. That macro is mentioned at the top of the --parse-c output. Maybe it can be helpful to look around the things that are mentioned there. julia _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
