On Wed, 29 Aug 2012, ron minnich wrote:
[rminnich@myhost tmp]$ spatch --sp-file j.cocci x.c init_defs_builtins: /usr/local/share/coccinelle/standard.h HANDLING: x.c diff = --- x.c +++ /tmp/cocci-output-22738-b1f1c7-x.c @@ -1,8 +1,5 @@ -int a(void){ - int i= 6; - return i; +done: return 0; -} [rminnich@myhost tmp]$ cat x.c j.cocci int a(void){ int i= 6; return i; done: return 0; } @@ @@ -a(...){...} note that it does not remove the function (at least some of it)
It is because done and return 0 are dead code. I will take a look. julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
