From owner-cvs-all@FreeBSD.ORG Mon Apr 2 18:10:08 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 179C716A404; Mon, 2 Apr 2007 18:10:08 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id EF6D913C44B; Mon, 2 Apr 2007 18:10:07 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id DD0B31A4D8F; Mon, 2 Apr 2007 11:10:07 -0700 (PDT) Date: Mon, 2 Apr 2007 11:10:07 -0700 From: Alfred Perlstein To: John Baldwin Message-ID: <20070402181007.GX61362@elvis.mu.org> References: <200703282125.l2SLPuR9058727@repoman.freebsd.org> <20070402042600.GB19923@wantadilla.lemis.com> <20070402093238.dmw2rypu40sksc0o@webmail.leidinger.net> <200704020821.15298.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200704020821.15298.jhb@freebsd.org> User-Agent: Mutt/1.4.2.2i Cc: Greg 'groggy' Lehey , Alexander Leidinger , 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) X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 18:10:08 -0000 * John Baldwin [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