[PATCH] bio: gcc warning fix.

From: Luiz Fernando Capitulino
Date: Fri Jan 06 2006 - 10:16:11 EST



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

Signed-off-by: Luiz Capitulino <lcapitulino@xxxxxxxxxxxxxxx>

fs/bio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/bio.c b/fs/bio.c
index 38d3e80..55a5688 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -164,7 +164,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_m

bio_init(bio);
if (likely(nr_iovecs)) {
- unsigned long idx;
+ unsigned long idx = 0;

bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
if (unlikely(!bvl)) {


--
Luiz Fernando N. Capitulino
-
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/