Commit eeae1d48 authored by Jens Axboe's avatar Jens Axboe

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: default avatarJens Axboe <jens.axboe@oracle.com>
parent 28f13702
...@@ -158,7 +158,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) ...@@ -158,7 +158,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
bio_init(bio); bio_init(bio);
if (likely(nr_iovecs)) { if (likely(nr_iovecs)) {
unsigned long idx = 0; /* shut up gcc */ unsigned long uninitialized_var(idx);
bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs); bvl = bvec_alloc_bs(gfp_mask, nr_iovecs, &idx, bs);
if (unlikely(!bvl)) { if (unlikely(!bvl)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment