Adjusting SmPL script “tests/nest3.cocci”?
Hello,
I have taken another look at a script for the semantic patch language.
https://github.com/coccinelle/coccinelle/blob/560c3d02e2085e83e9bcd40842eec7e774140131/tests/nest3.cocci
Can the following code variant be a bit nicer?
(Would you like to avoid the message “warning: rule starting on line 1:
metavariable func not used in the - or context code”?)
@@
identifier f, i;
@@
- int i;
<... when != i
- for (i = ...; i < ...; i++) f(...);
+ f(1);
...>
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci
Quoted 8 lines · Markus Elfring
Hello,
I have taken another look at a script for the semantic patch language.
https://github.com/coccinelle/coccinelle/blob/560c3d02e2085e83e9bcd40842eec7e774140131/tests/nest3.cocciCan the following code variant be a bit nicer?
(Would you like to avoid the message “warning: rule starting on line 1:
metavariable func not used in the - or context code”?)
I have dropped the declaration of the metavariable.
julia
Quoted 11 lines
@@
identifier f, i;
@@
- int i;
<... when != i
- for (i = ...; i < ...; i++) f(...);
+ f(1);
...>
Quoted 7 lines
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci