cvs commit: src/sys/dev/hptmv ioctl.c

Bruce Evans bde at optusnet.com.au
Mon May 21 09:49:45 UTC 2007


On Mon, 21 May 2007 mjacob at 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


More information about the cvs-all mailing list