Coccinelle archive on lore.kernel.org
 help / color / Atom feed
From: Jorge Pereira <jpereiran@gmail.com>
To: "stracelabs@gmail.com" <stracelabs@gmail.com>,
	Markus Elfring <markus.elfring@web.de>
Cc: "cocci@systeme.lip6.fr" <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Replacing printf() parameters according to used data types
Date: Fri, 29 Nov 2019 00:35:47 +0000
Message-ID: <CY4PR1801MB200527E64CB2C5ECF218EFF4A3460@CY4PR1801MB2005.namprd18.prod.outlook.com> (raw)
In-Reply-To: <a64ca4bf-4d00-6d8f-19cf-0667d9b1ca83@web.de>

[-- Attachment #1.1: Type: text/plain, Size: 980 bytes --]

For now, I just would like to detect and patch the mentioned example. I could imagine that could be possible do using Python,.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: Markus Elfring <Markus.Elfring@web.de>
Sent: Thursday, November 28, 2019 4:50:55 AM
To: stracelabs@gmail.com <stracelabs@gmail.com>
Cc: cocci@systeme.lip6.fr <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Replacing printf() parameters according to used data types

> @r1_stack@
> struct mydata SMD;
> format F =~ "s";
> @@
> -my_printf("%@F@", SMD.name);
> +my_printf("%m", &SMD);
> $
>
> But, I can match only with partial content as can be seen below.

I find this information for “partial content” unclear at the moment.

* Would you like to transform any more source code variants by using
  additional SmPL ellipses and disjunctions?

* How do you think about to extend and improve the shown change specifications?

Regards,
Markus

[-- Attachment #1.2: Type: text/html, Size: 2224 bytes --]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div dir="auto" style="direction:ltr; margin:0; padding:0; font-family:sans-serif; font-size:11pt; color:black">
For now, I just would like to detect and patch the mentioned example. I could imagine that could be possible do using Python,.<br>
<br>
</div>
<div dir="auto" style="direction:ltr; margin:0; padding:0; font-family:sans-serif; font-size:11pt; color:black">
<span id="x_OutlookSignature">
<div dir="auto" style="direction:ltr; margin:0; padding:0; font-family:sans-serif; font-size:11pt; color:black">
Get <a href="https://aka.ms/ghei36">Outlook for Android</a></div>
</span><br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Markus Elfring &lt;Markus.Elfring@web.de&gt;<br>
<b>Sent:</b> Thursday, November 28, 2019 4:50:55 AM<br>
<b>To:</b> stracelabs@gmail.com &lt;stracelabs@gmail.com&gt;<br>
<b>Cc:</b> cocci@systeme.lip6.fr &lt;cocci@systeme.lip6.fr&gt;<br>
<b>Subject:</b> Re: [Cocci] Replacing printf() parameters according to used data types</font>
<div>&nbsp;</div>
</div>
</div>
<font size="2"><span style="font-size:11pt;">
<div class="PlainText">&gt; @r1_stack@<br>
&gt; struct mydata SMD;<br>
&gt; format F =~ &quot;s&quot;;<br>
&gt; @@<br>
&gt; -my_printf(&quot;%@F@&quot;, SMD.name);<br>
&gt; &#43;my_printf(&quot;%m&quot;, &amp;SMD);<br>
&gt; $<br>
&gt;<br>
&gt; But, I can match only with partial content as can be seen below.<br>
<br>
I find this information for “partial content” unclear at the moment.<br>
<br>
* Would you like to transform any more source code variants by using<br>
&nbsp; additional SmPL ellipses and disjunctions?<br>
<br>
* How do you think about to extend and improve the shown change specifications?<br>
<br>
Regards,<br>
Markus<br>
</div>
</span></font>
</body>
</html>

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply index

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  2:11 [Cocci] Replacing printf/format calls based on the data-type Strace Labs
2019-11-28  7:07 ` Julia Lawall
2019-11-28 17:45   ` Strace Labs
2019-11-29 14:48   ` [Cocci] Replacing printf() parameters according to used data types Markus Elfring
2019-11-28  7:50 ` Markus Elfring
2019-11-29  0:35   ` Jorge Pereira [this message]
2019-11-29  8:29     ` Markus Elfring
2019-11-29 10:57       ` Strace Labs
2019-11-29 12:33         ` Markus Elfring
2019-11-29 14:47           ` Strace Labs
2019-11-29 16:08             ` Markus Elfring
2019-11-29 17:19               ` Strace Labs
2019-11-29 17:45                 ` Markus Elfring
2019-11-29 20:55             ` Julia Lawall
2019-11-30  2:25               ` Strace Labs
2019-11-30  6:35                 ` Julia Lawall
2019-11-30  8:46                 ` Markus Elfring
2019-12-01  8:00                 ` [Cocci] Changing format string usage with SmPL? Markus Elfring
2019-12-03  3:30                   ` Strace Labs
2019-12-03  5:18                     ` Julia Lawall
2019-12-03 13:28                       ` Markus Elfring
2019-12-03 15:43                       ` [Cocci] Generation of expression lists by SmPL script rules? Markus Elfring
2019-12-03 17:28                       ` [Cocci] Changing format string usage with SmPL? Strace Labs
2019-12-04  0:21                         ` Strace Labs
2019-12-06 19:36                           ` Markus Elfring
2019-12-07  7:49                           ` Markus Elfring
2019-12-04  6:47                         ` Julia Lawall
2019-12-06 19:44                           ` Markus Elfring
2019-12-06 19:20                         ` Markus Elfring
2019-12-03 10:01                     ` Markus Elfring
2019-11-30 15:11               ` [Cocci] Replacing printf() parameters according to used data types Markus Elfring

Reply instructions:

You may reply publically 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=CY4PR1801MB200527E64CB2C5ECF218EFF4A3460@CY4PR1801MB2005.namprd18.prod.outlook.com \
    --to=jpereiran@gmail.com \
    --cc=cocci@systeme.lip6.fr \
    --cc=markus.elfring@web.de \
    --cc=stracelabs@gmail.com \
    /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

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr
	public-inbox-index cocci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git