Re: 2.6.14 assorted warnings

From: Jens Axboe
Date: Fri Oct 28 2005 - 02:28:29 EST


On Fri, Oct 28 2005, Keith Owens wrote:
> fs/bio.c: In function 'bio_alloc_bioset':
> fs/bio.c:167: warning: 'idx' may be used uninitialized in this function

This is bogus. bio_alloc_bioset() passes in a pointer to a long which
bvec_alloc_bs() always fills, _unless_ it returns NULL. In the NULL case
we never use 'idx' (quite obvious, we bail immediately).

I didn't check the other warnings, but there may be similar cases in
other paths.

--
Jens Axboe

-
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/