cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] Deleting unused declarations for variables with SmPL?
@ 2018-12-25 13:40 SF Markus Elfring
  2018-12-25 13:45 ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2018-12-25 13:40 UTC (permalink / raw)
  To: Coccinelle

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
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-28  9:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-25 13:40 [Cocci] Deleting unused declarations for variables with SmPL? SF Markus Elfring
2018-12-25 13:45 ` Julia Lawall
     [not found]   ` <7d528a6a-33fd-c8ff-e703-c8ff47908e90@users.sourceforge.net>
2018-12-25 14:09     ` Julia Lawall
     [not found]   ` <a6c91cf5-4ff3-9088-0b58-b0039e495d58@users.sourceforge.net>
     [not found]     ` <alpine.DEB.2.21.1812251700080.8365@hadrien>
     [not found]       ` <88be4433-a617-056e-3dee-495a41e46110@users.sourceforge.net>
     [not found]         ` <alpine.DEB.2.21.1812251734590.8365@hadrien>
     [not found]           ` <afd513b0-e16a-a5ca-088f-244a31097f9d@users.sourceforge.net>
     [not found]             ` <f1884111-1762-b96e-7f08-c327704e5ba0@users.sourceforge.net>
     [not found]               ` <alpine.DEB.2.21.1812251823440.8365@hadrien>
     [not found]                 ` <ff650b4e-5058-e2d6-9815-4f8372ed32c1@users.sourceforge.net>
     [not found]                   ` <alpine.DEB.2.21.1812271622350.2457@hadrien>
     [not found]                     ` <36f19c49-a6e9-11f1-2bb8-c22ad3ca8e54@users.sourceforge.net>
2018-12-27 19:49                       ` Julia Lawall
2018-12-28  9:50                       ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).