Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2007 19:49:40 +1000 (EST)
From:      Bruce Evans <bde@optusnet.com.au>
To:        mjacob@FreeBSD.org
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/dev/hptmv ioctl.c
Message-ID:  <20070521194915.U75656@besplex.bde.org>
In-Reply-To: <20070521022122.U34232@ns1.feral.com>
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>

index | next in thread | previous in thread | raw e-mail

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


home | help

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