Re: [Cocci] correct handling of return values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx/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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux