From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Adding parameter to function if missing
Date: Thu, 7 Jul 2016 17:43:19 +0200 [thread overview]
Message-ID: <58ca2593-e9d4-688f-06c2-420b665c9d75@users.sourceforge.net> (raw)
In-Reply-To: <a2cccefd6c0f4986a03a61edf21be6cd@vprd-opci0018.b-com.local>
> +++ /tmp/cocci-output-7971-016dcc-test.c
> @@ -1,9 +1,9 @@
> void f1(void *args) {
> - bar(anything);
> + bar(foo, anything);
> }
> [...]
> All call are replaced and no header are modified.
Would you like to achieve such source code transformations also in header files?
>> Will it make sense to add the SmPL specification "type
>> fn_with_user.my_type;" here?
>
> Removing typedef and using type gave me the same result.
I suggest to reconsider also the relevance of the prefix "fn_with_user.".
Will such a references to a previous SmPL rule matter in your use cases
a bit more occasionally?
> - fn(void) {
> + fn(my_type foo) {
> <+...
> - bar(E);
> + bar(foo, E);
> ...+>
> }
How do you think about to use a shorter change variant?
fn(
- void
+ my_type foo
)
{
<+...
bar(
+ foo,
E);
...+>
}
Regards,
Markus
prev parent reply other threads:[~2016-07-07 15:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 13:54 [Cocci] Adding missing parameter to function if missing Frédéric LEROY (ext)
2016-07-06 16:23 ` Julia Lawall
2016-07-07 12:18 ` Frédéric LEROY (ext)
2016-07-07 16:14 ` [Cocci] Adding " SF Markus Elfring
2016-07-08 10:46 ` Frédéric LEROY (ext)
2016-07-07 17:09 ` [Cocci] Adding missing " Julia Lawall
2016-07-06 16:50 ` [Cocci] Adding " SF Markus Elfring
2016-07-07 11:54 ` Frédéric LEROY (ext)
2016-07-07 15:43 ` SF Markus Elfring [this message]
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=58ca2593-e9d4-688f-06c2-420b665c9d75@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.