I'm stuck on something I thought I knew how to do.
The first two rules in this file work, the third (which I just added)
fails. The goal is to change instances of the function, uses of the
struct, and
prototype declarations of the function. I'm doing something simple
wrong. I realize I could use alternation but I'm still learning.
thanks
ron
[rminnich@myhost video]$ cat deldev.cocci
@@
identifier func;
identifier d;
@@
-func(struct drm_device *d)
+func(void)
{...}
@@
identifier dev;
expression i;
@@
-struct drm_i915_private *dev = i;
@@
identifier func;
identifier d;
@@
-func(struct drm_device *d);
+func(void);
The error is as follows:
[rminnich@myhost video]$ spatch --in-place -sp_file deldev.cocci ib.c
init_defs_builtins: /usr/local/share/coccinelle/standard.h
217 218
Fatal error: exception Failure("minus: parse error:
= File "deldev.cocci", line 17, column 25, charpos = 217
around = 'd', whole content = -func(struct drm_device *d);
")
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)