On Thu, 21 Jul 2016, SF Markus Elfring wrote:
> Hello,
>
> I am trying the software combination "spatch version
> 1.0.5-00058-g36edc2b-dirty
> compiled with OCaml version 4.03.0" out a bit more with the following
> approach.
>
>
> @checking_function_calls_directly@
> identifier checker, retval, work;
> parameter list pl;
> statement is, es;
> type rt;
> @@
> rt checker(...)
> {
> ...
> -retval = work(pl);
> if (
> - retval
> + work(pl)
> )
> is
> else
> es
> ...
> }
>
>
> elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch.opt -sp-file
> checking_function_calls_directly1.cocci
> ~/Projekte/Linux/next-patched/drivers/staging/ks7010/ks7010_sdio.c
> init_defs_builtins: /usr/local/lib64/coccinelle/standard.h
> minus: parse error:
> File "checking_function_calls_directly1.cocci", line 10, column 15, charpos
> = 151
> around = 'pl',
> whole content = -retval = work(pl);
>
>
>
> Do I overlook anything in my SmPL script?
A parameter list is something that comes after the name of a function in
the function header. Something like int x, int y, in foo (int x, int y) {
... }. Probably you want an expression list.
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci