From: Julia Lawall <julia.lawall@inria.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: cocci@inria.fr, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, tools@kernel.org
Subject: Re: [cocci] [RFC] Detecting unchecked return values (with SmPL)?
Date: Mon, 30 Nov 2026 14:52:34 +0100 (CET) [thread overview]
Message-ID: <83f2a22e-a4a9-1a62-df84-29246cc35e72@inria.fr> (raw)
In-Reply-To: <f5c0947d-7649-4255-a6d9-77a111feb2de@web.de>
On Mon, 30 Nov 2026, Markus Elfring wrote:
> > > Macro and function calls for which a return value is not assigned to a variable
> > > can be found also by a script (like the following) for the semantic patch language.
> > >
> > > @display@
> > > identifier i;
> > > statement s;
> > > @@
> > > (
> > > *i(...);
> > > &s
> >
> > &s seems totally unnecessary.
>
> Can the code for the SmPL asterisk alone represent also a source code search
> for a call where a variable assignment would be attempted?
No. Not with the ;. Coccinelle parses the code. It doesn't search for
substrings.
julia
>
> Or:
> Do you expect to specify the variable assignment exclusion in any other ways?
>
> Regards,
> Markus
>
next prev parent reply other threads:[~2026-11-30 13:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 13:00 Markus Elfring
2026-11-30 13:05 ` Julia Lawall
2026-11-30 13:25 ` [cocci] " Markus Elfring
2026-11-30 13:52 ` Julia Lawall [this message]
2026-11-30 14:00 ` Markus Elfring
2026-11-30 15:49 ` Julia Lawall
2026-11-30 15:58 ` Markus Elfring
2026-11-30 16:44 ` Markus Elfring
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=83f2a22e-a4a9-1a62-df84-29246cc35e72@inria.fr \
--to=julia.lawall@inria.fr \
--cc=Markus.Elfring@web.de \
--cc=cocci@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tools@kernel.org \
/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
all inboxes | Powered by JetHome®