Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e976cad0 authored by Sage Weil's avatar Sage Weil
Browse files

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: default avatarSage Weil <sage@inktank.com>
parent 667ca05c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;