On Sun, 30 Jan 2011, SF Markus Elfring wrote: > > I'm trying to match the cases where the return value from the > > function bar() isn't used in any way. > > I asked also for this feature in my request "Detection of ignored function > return values". > http://lists.diku.dk/pipermail/cocci/2010-February/000690.html
I think the solution I proposed to Anders should work, although I have not tested it. The general principle is to search for things that have the property you want, and then signal everything else as an error. Or record the position of everything else, and then use that for further processing. > I find that it is still an open issue because I see a need for the extension > of > the semantic patch language for this purpose. > http://coccinelle.lip6.fr/docs/main_grammar002.html#metadecl > > Do I read the SmPL grammar correctly if a function return type is not > listed for the types of meta-variables? One can declare that a metavariable should have a certain type, so that it would seem that one could declare that a metavariable should have a certain function type. I'm not sure that the support for function types is very robust though. julia > Would you like to extended this list for the support of more constructs from a > programming language like C? > > Regards, > Markus > _______________________________________________ > Cocci mailing list > [email protected] > http://lists.diku.dk/mailman/listinfo/cocci > (Web access from inside DIKUs LAN only) > _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
