From owner-cvs-src@FreeBSD.ORG Mon May 21 09:49:45 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A62116A469; Mon, 21 May 2007 09:49:45 +0000 (UTC) (envelope-from bde@optusnet.com.au) Received: from mail33.syd.optusnet.com.au (mail33.syd.optusnet.com.au [211.29.132.104]) by mx1.freebsd.org (Postfix) with ESMTP id CFD3813C469; Mon, 21 May 2007 09:49:44 +0000 (UTC) (envelope-from bde@optusnet.com.au) Received: from besplex.bde.org (c211-30-216-190.carlnfd3.nsw.optusnet.com.au [211.30.216.190]) by mail33.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l4L9nepd004546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 May 2007 19:49:42 +1000 Date: Mon, 21 May 2007 19:49:40 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: mjacob@FreeBSD.org In-Reply-To: <20070521022122.U34232@ns1.feral.com> Message-ID: <20070521194915.U75656@besplex.bde.org> References: <200705201649.l4KGnApl032671@repoman.freebsd.org> <20070521132204.D86236@besplex.bde.org> <20070520212020.D71516@ns1.feral.com> <20070521181500.S56415@delplex.bde.org> <20070521022122.U34232@ns1.feral.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/hptmv ioctl.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 09:49:45 -0000 On Mon, 21 May 2007 mjacob@FreeBSD.org wrote: > On Mon, 21 May 2007, Bruce Evans wrote: >> But the non-bug is still in the function and should be fixed and documented >> there, not in all callers. > > I can't parse this. "Non-bug": it's a warning about a problem which you say doesn't exist. "fixed": normal sloppy wording for "work around the unwanted warning about a non-bug, having investigated the warning and found that there is no problem". Fixing non-bugs is impossible since there is nothing to fix. THere is nothing to fix in gcc either, since we asked for the warning and the warning is not spurious. >> In hptmv/ioctl.c, the problem is that the function searches a list and >> only initializes the variables if the list is non-empty. gcc cannot see >> if the list is non-empty, and neither can I. > > That's right. It at least depends upon the hptmv configuring for there to be > a non-zero controller list and for it to be possible that the function will > be called. > > I'm going to try something you indirectly suggested which is to add the > initialization in the called function- that would be preferrable. I thought that I suggested that directly. The problem is much easier to fix and document in context even if there is only one caller as here. Bruce