Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2007 11:10:07 -0700
From:      Alfred Perlstein <alfred@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Greg 'groggy' Lehey <grog@freebsd.org>, Alexander Leidinger <Alexander@leidinger.net>, src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org
Subject:   Re: Giving in to Coverity (was: cvs commit: src/sys/netgraph/bluetooth/l2cap ng_l2cap_cmds.c)
Message-ID:  <20070402181007.GX61362@elvis.mu.org>
In-Reply-To: <200704020821.15298.jhb@freebsd.org>
References:  <200703282125.l2SLPuR9058727@repoman.freebsd.org> <20070402042600.GB19923@wantadilla.lemis.com> <20070402093238.dmw2rypu40sksc0o@webmail.leidinger.net> <200704020821.15298.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* John Baldwin <jhb@freebsd.org> [070402 05:30] wrote:
> > There are several cases where Coverity gets something wrong (e.g. the  
> > use of TAILQ). I did mark those as invalid in Coverity (until either  
> > we get a new version of Coverity which understands this, or someone  
> > writes a model of the TAILQ stuff for Coverity, or until someone tells  
> > me to mark them as false positives). I did this because I don't know  
> > how to fix this in our code _and_ I see no benefit in fixing this in  
> > our code just to make Coverity not moan. For the void cast we are  
> > talking about I see a benefit. Coverity can count this as "the return  
> > value of this function is checked". As such a report is only generated  
> > if a specific percentage of the use of a function is handled this way,  
> > it is important if we want to get reports for this. And we want to get  
> > reports for functions where the return value typically has to be  
> > checked.
> 
> There is previous history of casting a function's return value to (void) to 
> please lint(1).  Just look for '(void)printf' :)  Coverity at least is 
> smarter than lint as it doesn't warn about printf not being checked.

I always found the (void)intfunction() stuff in code to be particulary
exciting.

-- 
- Alfred Perlstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070402181007.GX61362>