[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070322162550.GB5591@localhost>
Date: Thu, 22 Mar 2007 17:26:04 +0100
From: Johannes Weiner <hannes-kernel@...urebad.de>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: roland <devzero@....de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] - fix compile warning: `found' might be used uninitialized in this function
Hi,
On Thu, Mar 22, 2007 at 12:45:40AM -0800, Andrew Morton wrote:
> > On Thu, Mar 22, 2007 at 12:48:05AM +0100, roland wrote:
> > > fs/block_dev.c: In function `bd_claim_by_kobject':
> > > fs/block_dev.c:953: warning: `found' might be used uninitialized in this
> > > function
> >
> > found actually _is_ used uninitialized if the call to bd_claim() returns
> > anything but 0.
>
> No, it isn't.
>
> if (res || found)
> free_bd_holder(bo);
>
> `found' won't be evaluated if res!=0.
Oh, thank you very much. So this warning is another gcc false-positive?
> The code in there is irksome - it'd be nice to find some way of
> restructuring it to make it less obscure, and to kill that warning.
Functionscope or filescope? ;)
=Hannes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists