* Re: [Cocci] correct handling of return values
@ 2010-07-29 8:18 SF Markus Elfring
2010-07-29 8:56 ` Julia Lawall
2010-08-07 13:14 ` Nicolas Palix
0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2010-07-29 8:18 UTC (permalink / raw)
To: kernel-janitors
> 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
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Cocci] correct handling of return values
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
1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2010-07-29 8:56 UTC (permalink / raw)
To: kernel-janitors
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.
julia
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Cocci] correct handling of return values
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
1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Palix @ 2010-08-07 13:14 UTC (permalink / raw)
To: kernel-janitors
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-07 13:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox