diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-05-07 07:26:27 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-05-07 07:26:27 -0400 |
commit | eeae1d48c011839d9e1cdc1e8aacf0193c9d8197 (patch) | |
tree | 77696d424a374adf671b1afb2ed03a76a65fee48 /fs/bio.c | |
parent | 28f13702f03e527fcb979747a882cf366c489c50 (diff) |
block: use unitialized_var() in bio_alloc_bioset()
Better than setting idx to some random value and it silences the
same bogus gcc warning.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -158,7 +158,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) | |||
158 | 158 | ||
159 | bio_init(bio); | 159 | bio_init(bio); |
160 | if (likely(nr_iovecs)) { | 160 | if (likely(nr_iovecs)) { |
161 | unsigned long idx = 0; /* shut up gcc */ | 161 | unsigned long uninitialized_var(idx); |
162 | 162 | ||
163 | bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs); | 163 | bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs); |
164 | if (unlikely(!bvl)) { | 164 | if (unlikely(!bvl)) { |