summaryrefslogtreecommitdiff
path: root/fs/bio.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-02-19 08:50:26 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-02-26 10:45:48 +0100
commitb2bf96833c5782befc3e7700f791fde754a47b01 (patch)
treeb38745750c948b519e4c46bb9589d3a61c6359f4 /fs/bio.c
parent169d418b127b98a3e464e9c4b807ad083760f98c (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/bio.c')
-rw-r--r--fs/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 72ab251cdb9..124b95c4d58 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -302,7 +302,7 @@ void bio_init(struct bio *bio)
struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
{
struct bio *bio = NULL;
- void *p;
+ void *uninitialized_var(p);
if (bs) {
p = mempool_alloc(bs->bio_pool, gfp_mask);