diff options
author | Sage Weil <sage@inktank.com> | 2013-06-09 08:40:39 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-03 15:32:50 -0700 |
commit | e976cad0f0dbe5440a4ca38e29e1f932d9319125 (patch) | |
tree | f13168ba6c1936f2c9340e53ed2d05258d9b2261 /drivers/block | |
parent | 667ca05cd9f02f0a345446abc362484c019d4d71 (diff) | |
download | linux-e976cad0f0dbe5440a4ca38e29e1f932d9319125.tar.bz2 |
rbd: fix a couple warnings
gcc isn't quite smart enough and generates these warnings:
drivers/block/rbd.c: In function 'rbd_img_request_fill':
drivers/block/rbd.c:1266:22: warning: 'bio_list' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/block/rbd.c:2186:14: note: 'bio_list' was declared here
drivers/block/rbd.c:2247:10: warning: 'pages' may be used uninitialized in this function [-Wmaybe-uninitialized]
even though they are initialized for their respective code paths.
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 14c6dc92ef0e..4ad2ad9a5bb0 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -2163,9 +2163,9 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request, struct rbd_obj_request *obj_request = NULL; struct rbd_obj_request *next_obj_request; bool write_request = img_request_write_test(img_request); - struct bio *bio_list; + struct bio *bio_list = 0; unsigned int bio_offset = 0; - struct page **pages; + struct page **pages = 0; u64 img_offset; u64 resid; u16 opcode; |