From 0e5a165b81634a07d89532e0a1e858ffea8215b5 Mon Sep 17 00:00:00 2001 From: amitkuma Date: Tue, 22 Aug 2017 20:44:03 +0530 Subject: [PATCH] tools: Initialization of *server, command ** 1351688 Uninitialized pointer field 2. uninit_member: Non-static class member server is not initialized in this constructor nor in any functions that it calls. 4. uninit_member: Non-static class member field request.magic is not initialized in this constructor nor in any functions that it calls. 6. uninit_member: Non-static class member field request.type is not initialized in this constructor nor in any functions that it calls. 8. uninit_member: Non-static class member field request.from is not initialized in this constructor nor in any functions that it calls. 10. uninit_member: Non-static class member field request.len is not initialized in this constructor nor in any functions that it calls. 12. uninit_member: Non-static class member field reply.magic is not initialized in this constructor nor in any functions that it calls. 14. uninit_member: Non-static class member field reply.error is not initialized in this constructor nor in any functions that it calls. CID 1351688 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) 16. uninit_member: Non-static class member command is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Amit Kumar amitkuma@redhat.com --- src/tools/rbd_nbd/rbd-nbd.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/rbd_nbd/rbd-nbd.cc b/src/tools/rbd_nbd/rbd-nbd.cc index 52b16230f1a30..e03abc42d3fc1 100644 --- a/src/tools/rbd_nbd/rbd-nbd.cc +++ b/src/tools/rbd_nbd/rbd-nbd.cc @@ -159,11 +159,11 @@ private: struct IOContext { xlist::item item; - NBDServer *server; + NBDServer *server = nullptr; struct nbd_request request; struct nbd_reply reply; bufferlist data; - int command; + int command = 0; IOContext() : item(this) -- 2.39.5