* [Cocci] OK, this time I *promise* I'm stuck
@ 2013-08-01 15:56 ron minnich
2013-08-09 11:05 ` Michael Stefaniuc
0 siblings, 1 reply; 2+ messages in thread
From: ron minnich @ 2013-08-01 15:56 UTC (permalink / raw)
To: cocci
I've got lots of these:
void f(int i, Chan *x)
or similar
to
void f(int i, struct chan *x)
I've got lots of spatches that selectively delete function calls with
certain types, but not that change a parameter.
I've tried stuff like this:
@@
function f;
identifier d;
@@
f(...,
-Chan *d,
+struct chan *d,
...);
and several variants but ... no luck.
thanks
ron
_______________________________________________
Cocci mailing list
Cocci at diku.dk
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Cocci] OK, this time I *promise* I'm stuck
2013-08-01 15:56 [Cocci] OK, this time I *promise* I'm stuck ron minnich
@ 2013-08-09 11:05 ` Michael Stefaniuc
0 siblings, 0 replies; 2+ messages in thread
From: Michael Stefaniuc @ 2013-08-09 11:05 UTC (permalink / raw)
To: cocci
On 08/01/2013 05:56 PM, ron minnich wrote:
> @@
> function f;
> identifier d;
> @@
> f(...,
> -Chan *d,
> +struct chan *d,
> ...);
There are multiple issues with this:
- function is not a metavariable, coccinelle assumes that f is an
expression of type "function".
- f( ) is a function call not a function definition.
- coccinelle doesn't detects that "Chan" is a type.
@@
identifier f, d;
typedef Chan;
type T;
@@
T f(...,
-Chan
+struct chan
*d, ...);
bye
michael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-09 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 15:56 [Cocci] OK, this time I *promise* I'm stuck ron minnich
2013-08-09 11:05 ` Michael Stefaniuc
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.