Re: kfifo must_check warning (+ patch)

From: Andrew Morton
Date: Wed Oct 20 2010 - 14:56:46 EST


On Wed, 20 Oct 2010 19:37:02 +0100
Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:

> > Some versions of gcc mysteriously report:
> > drivers/char/n_gsm.c:1580: warning: ignoring return value of '__kfifo_must_check_helper', declared with attribute warn_unused_result
> >
> > This warning can be eliminated by using a local variable for the
> > returned result value, as suggested by Andrew Morton.
>
> But that just hides the bug in the helper surely - the helper has type
> errors so needs fixing - not this. If you apply this then the underlying
> bug is just going to get forgotten
>

It won't get forgotten.

I agree that the warning is probably an artifact of the signedness
thing. So for 2.6.36, disabling __kfifo_must_check_helper() will
suffice. I'm sure that Stefani will fix up __kfifo_must_check_helper()
for real for 2.6.37, then we can see if the warning reoccurs.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/