From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABEBDC432C0 for ; Fri, 29 Nov 2019 17:20:19 +0000 (UTC) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D5256216F4 for ; Fri, 29 Nov 2019 17:20:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ep1a+13F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5256216F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=cocci-bounces@systeme.lip6.fr Received: from systeme.lip6.fr (systeme.lip6.fr [132.227.104.7]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id xATHJxDN019434; Fri, 29 Nov 2019 18:19:59 +0100 (CET) Received: from systeme.lip6.fr (systeme.lip6.fr [127.0.0.1]) by systeme.lip6.fr (Postfix) with ESMTP id 8E03277D4; Fri, 29 Nov 2019 18:19:59 +0100 (CET) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by systeme.lip6.fr (Postfix) with ESMTPS id 701BE77D2 for ; Fri, 29 Nov 2019 18:19:57 +0100 (CET) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20:0:0:0:331] (may be forged)) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id xATHJuSh028230 for ; Fri, 29 Nov 2019 18:19:56 +0100 (CET) Received: by mail-wm1-x331.google.com with SMTP id s14so9144987wmh.4 for ; Fri, 29 Nov 2019 09:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1mRyFy1VGf70vpdTQrq0VhPFbGNnXSk7B0PV/3MyllU=; b=Ep1a+13Fixd3cw9hVk6J1ydOJcUCzZtiv/cRd613KvfCD3HQjr4h2WX6+WF6vWKN95 FQNkZF6rRcp3Vkm/H3RDdj6i1jCgORw2UWOuWAcg57SkQaBq3HrTXX27IlCY2q1rCzCg LkzhmJpH7IBCH3BpNqdT+fBqLK0fLt7f+/5YgvT1oh0yhw5fP1OkTpNUvO4/DAEj8Idy wOjwSP5+435wc5XdDOamHWjQGT1z1Nh98F6reHvquOtlgE/J4yhYH5/CNYVb7AGLKL4+ SHZZkPwaB0DABezdx7wA5b+wPR6V43kPD1tY2dHeFuSBKAjZFIfnLCWhNofegypkYPPe y1Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1mRyFy1VGf70vpdTQrq0VhPFbGNnXSk7B0PV/3MyllU=; b=WsGec2V8yHgTmLGDn8Ff1TsOXwbEQ04AptybsyXXrW5JUcBh+36YQW0XAZDK1BThor XKFmLlG1cuUfT9JuDro7QJnPFaLOh7ta02c952gQre2q2zQe++s9ds74VbgF7VttDM7O 1PMr4rUArGwunz7/JjlWWRQoj5L9HVDA3YP4W3yhdOxw4YvuqnDhpDCm4pxHsL9kB4FZ fDSp9DKsjwSdauVkOT44IgnQ7NwiYS19uwlee+a2i5+2m8pEvb0dZpg6uL6TSKBGRYhJ stujitdaCYZaFPx5C3OZRIkI7mfnsWb7teUWQcY5nJSQ4EeOtIKpKrZOBvpt9XhO7wl3 dv6Q== X-Gm-Message-State: APjAAAVDSm9cB/giNLY984Ct45Ged0srKnizntrKySDtzVcTOIFJNT5B gGPlnmUT8pCNNNtoyW+j9MmxS2iKWKaEr3EBfeU= X-Google-Smtp-Source: APXvYqztKy4udZMfQBd43COC/i598EauDU60xSOx9+2L46ckHLEW86sKma8kkzvJRiMSpen3aaChEp4zq4EDasELXcA= X-Received: by 2002:a1c:f705:: with SMTP id v5mr15216620wmh.82.1575047996334; Fri, 29 Nov 2019 09:19:56 -0800 (PST) MIME-Version: 1.0 References: <509ffde0-ec26-a58c-d424-6910bc8e7473@web.de> <02fa7455-e76e-7d7d-0d64-41b2803a8025@web.de> <9e9f6596-1b8d-dc4f-86cf-21094200809d@web.de> In-Reply-To: <9e9f6596-1b8d-dc4f-86cf-21094200809d@web.de> From: Strace Labs Date: Fri, 29 Nov 2019 15:19:20 -0200 Message-ID: To: Markus Elfring X-Greylist: Sender IP whitelisted, Sender e-mail whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Fri, 29 Nov 2019 18:20:00 +0100 (CET) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [IPv6:2001:660:3302:283c:0:0:0:2]); Fri, 29 Nov 2019 18:19:56 +0100 (CET) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 X-Scanned-By: MIMEDefang 2.78 Cc: cocci@systeme.lip6.fr Subject: Re: [Cocci] Replacing printf() parameters according to used data types X-BeenThere: cocci@systeme.lip6.fr X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0028047253==" Sender: cocci-bounces@systeme.lip6.fr Errors-To: cocci-bounces@systeme.lip6.fr --===============0028047253== Content-Type: multipart/alternative; boundary="00000000000053697405987f70bd" --00000000000053697405987f70bd Content-Type: text/plain; charset="UTF-8" On Fri, Nov 29, 2019 at 2:09 PM Markus Elfring wrote: > > so, that suggestion works the same as my previous shared statement. > > I suggest to take another look at presented implementation details. > > I did it, even digging the grammar and ALL samples and didn't find anything similar to handle format strings with multiple parameters as mentioned. > > > but, only for calls like: *my_printf("%s", h1.name);*, > > I limited my suggestion intentionally. > > > > not for *my_printf("%d here also, tt=%s | %s and %m\n", id, h2->name, > h2->name, s2);* > > Such a function call is using more parameters. Would you get into > the mood then to specify additional metavariables in SmPL script variants? > > I can't because the calls around the code have different uses with different variants. > > so, I am not sure if Coccinelle is able to do that. > > I hope that more useful data processing for format strings will become > supported by the semantic patch language. > Yesterday an information was given that another functionality is also > work in progress. > Interesting. > > > I've read all samples available in the Kernel and Coccinelle repo's > > I find such information interesting and promising. > > > > and I didn't see any similar case. > > This observation can be fine. > How often do you fiddle with source code transformations around > format strings? > > Well, I've used it before but for me, it is the first "complex" case that I am working on. even I still digging trying to figure out how to do that but I still not sure if the Coccelinne is capable to do that yes or no. > > > I think that if Julia Lawall don't know, No one in the world knows. > > Such an impression can occur. - But I would like to point further > possibilities out for desired knowledge distribution. > > * Would you like to contact any more related developers? * How do you think about to improve your own expertise > (around the discussed free software) in any ways? > > Regards, > Markus > --00000000000053697405987f70bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Fri, Nov 29, 2019 at 2:09 PM Markus El= fring <Markus.Elfring@web.de> wrote:
> so, that suggestion works the same as my previ= ous shared statement.

I suggest to take another look at presented implementation details.



> but, only for calls like:=C2=A0*my_printf("%s",
h1.name);*,

I limited my suggestion intentionally.


> not for=C2=A0*my_printf("%d here also, tt=3D%s | %s and %m\n"= ;, id, h2->name, h2->name, s2);*

Such a function call is using more parameters. Would you get into
the mood then to specify additional metavariables in SmPL script variants?<= br>


I can't because the= calls around the code have different uses with different variants.=C2=A0



> so, I am not sure if Coccinelle is able to do that.

I hope that more useful data processing for format strings will become
supported by the semantic patch language.
Yesterday an information was given that another functionality is also
work in progress.



Interesting.
=C2=A0



> I've read all samples available in the Kernel and Coccinelle repo&= #39;s

I find such information interesting and promising.


> and I didn't see any similar case.

This observation can be fine.
How often do you fiddle with source code transformations around
format strings?




Well, I&= #39;ve used it before but for me, it is the first "complex" case = that I am working on. even I still digging trying to figure out how to do t= hat but I still not sure if the Coccelinne is capable to do that yes or no.=


=C2=A0

> I think that if Julia Lawall don't know, No one in the world knows= .

Such an impression can occur. - But I would like to point further
possibilities out for desired knowledge distribution.

* Would you like to contact any more related developers?
* How do you think about to improve your own expertise
=C2=A0 (around the discussed free software) in any ways?

Regards,
Markus
--00000000000053697405987f70bd-- --===============0028047253== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci --===============0028047253==--