Hello,

I have tried another simple script out for the semantic patch language.

@deletion@
identifier x;
type t;
@@
-t x;
 ... when != x


elfring@Sonne:~/Projekte/Linux/next-patched> spatch 
~/Projekte/Coccinelle/Probe/delete_unused_variable1.cocci init/main.c
…
@@ -101,22 +101,6 @@
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/initcall.h>
-
-static int kernel_init(void *);
-
-extern void init_IRQ(void);
…


Now I wonder about the generated change suggestions.
Does such a transformation approach need any extensions for the safe handling
of function declarations?

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to