From d0a180131c6655487b47ea72e7da0a909a479a3c Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 17 Aug 2017 18:14:13 +0200 Subject: fix build failure in nbd_read_reply_entry() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit travis builds fail at HEAD at rc3 master with block/nbd-client.c: In function ‘nbd_read_reply_entry’: block/nbd-client.c:110:8: error: ‘ret’ may be used uninitialized in this function [-Werror=uninitialized] fix it by initializing 'ret' to 0 Signed-off-by: Igor Mammedov Reviewed-by: Eric Blake Signed-off-by: Peter Maydell --- block/nbd-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nbd-client.c b/block/nbd-client.c index 422ecb4307..02c8e207ef 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -70,7 +70,7 @@ static coroutine_fn void nbd_read_reply_entry(void *opaque) { NBDClientSession *s = opaque; uint64_t i; - int ret; + int ret = 0; Error *local_err = NULL; while (!s->quit) { -- cgit v1.2.3