From: Nicolas Palix <npalix@diku.dk>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Cocci] correct handling of return values
Date: Sat, 07 Aug 2010 13:14:09 +0000 [thread overview]
Message-ID: <201008071514.10405.npalix@diku.dk> (raw)
In-Reply-To: <4C51394B.2060306@users.sourceforge.net>
Hi,
On Thursday 29 July 2010 10:56:21 Julia Lawall wrote:
> On Thu, 29 Jul 2010, SF Markus Elfring wrote:
>
> > > I'm currently working on this task:
> > > http://kernelnewbies.org/KernelJanitors/Todo/ReturnCodes
> > >
> > > I think this task can be partly done with coccinelle. The most often cases of
> > > invalid handling is no handling :)
> > >
> > > I am not guru of coccinelle, but I think it is very useful here. So,
> > > I've written basic script of finding common errors, but it is not ideal.
> >
> > Were any improvements achieved since my request "Detection of ignored function
> > return values" that will help in this use case?
> > http://lists.diku.dk/pipermail/cocci/2010-February/000690.html
> > http://www.mail-archive.com/cocci@diku.dk/msg00157.html
>
> Looking back at that disucssion, it sees that the main issue was whether
> one would know the return type of a function. If the function is not
> local, one can know that from the prototype. One then runs into the
> problem that prototypes are often in header files, and Coccinelle takes
> into account at most the header files that are mentioned in the file
> explicitly. Nothing has changed in that regard.
>
> If you care only about bug finding, but not automatic bug fixing, a
> possibility is to run CPP first. There is some support for doing this,
> but I don't remember what it is. Nicolas Palix should know, however.
It is with the spp tool. See tools/spp.ml and demos/spp in the source distribution.
I added some information in the wiki.
http://cocci.ekstranet.diku.dk/wiki/doku.php?id=using_cpp
>
> julia
> _______________________________________________
> Cocci mailing list
> Cocci@diku.dk
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
>
--
Nicolas Palix
Tel: (+33) 1 44 27 87 25
Tel: (+33) 6 81 07 91 72
Web: http://www.diku.dk/~npalix/
prev parent reply other threads:[~2010-08-07 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-29 8:18 [Cocci] correct handling of return values SF Markus Elfring
2010-07-29 8:56 ` Julia Lawall
2010-08-07 13:14 ` Nicolas Palix [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=201008071514.10405.npalix@diku.dk \
--to=npalix@diku.dk \
--cc=kernel-janitors@vger.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