diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-02-19 02:50:26 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-02-26 04:45:48 -0500 |
commit | b2bf96833c5782befc3e7700f791fde754a47b01 (patch) | |
tree | b38745750c948b519e4c46bb9589d3a61c6359f4 /fs | |
parent | 169d418b127b98a3e464e9c4b807ad083760f98c (diff) |
block: fix bogus gcc warning for uninitialized var usage
Newer gcc throw this warning:
fs/bio.c: In function ?bio_alloc_bioset?:
fs/bio.c:305: warning: ?p? may be used uninitialized in this function
since it cannot figure out that 'p' is only ever used if 'bs' is non-NULL.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -302,7 +302,7 @@ void bio_init(struct bio *bio) | |||
302 | struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) | 302 | struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs) |
303 | { | 303 | { |
304 | struct bio *bio = NULL; | 304 | struct bio *bio = NULL; |
305 | void *p; | 305 | void *uninitialized_var(p); |
306 | 306 | ||
307 | if (bs) { | 307 | if (bs) { |
308 | p = mempool_alloc(bs->bio_pool, gfp_mask); | 308 | p = mempool_alloc(bs->bio_pool, gfp_mask); |