From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Coccinelle <cocci@systeme.lip6.fr>
Subject: [Cocci] Deleting unused declarations for variables with SmPL?
Date: Tue, 25 Dec 2018 14:40:15 +0100 [thread overview]
Message-ID: <61e8d3e3-e445-fc51-a9cc-c982dbb73bdb@users.sourceforge.net> (raw)
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
next reply other threads:[~2018-12-25 13:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-25 13:40 SF Markus Elfring [this message]
2018-12-25 13:45 ` [Cocci] Deleting unused declarations for variables with SmPL? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61e8d3e3-e445-fc51-a9cc-c982dbb73bdb@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=cocci@systeme.lip6.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).