Re: [PATCH] bio: gcc warning fix.

Daniel Barkalow
2006-01-06T22:41:47Z

On Fri, 6 Jan 2006, Al Viro wrote:

> On Fri, Jan 06, 2006 at 01:07:29PM -0200, Luiz Fernando Capitulino wrote:
> >
> > Fixes the following gcc 4.0.2 warning:
> >
> > fs/bio.c: In function 'bio_alloc_bioset':
> > fs/bio.c:167: warning: 'idx' may be used uninitialized in this function
>
> NAK. There is nothing to fix except for broken logics in gcc.
> Please, do not obfuscate correct code just to make gcc to shut up.
> Especially for this call of warnings; gcc4 *blows* in that area.

Wouldn't it be worthwhile to add -Wno-uninitialized for gcc4, since those
warnings mostly have to be ignored (and are therefore not useful for
finding actual uninitialized variables) and make it harder to see other
types of warnings which might be informative?

This would also reduce the number of patches submitted for correct code,
since people wouldn't keep having to be told to ignore those warnings.

-Daniel
*This .sig left intentionally blank*