From: amitkuma Date: Mon, 18 Sep 2017 12:37:18 +0000 (+0530) Subject: client,osd,test: Initialize fuse_req_key,snap,who,seq X-Git-Tag: v13.0.1~125^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=09b7362036d711e95acf26aa4e4369c1f69c708b;p=ceph.git client,osd,test: Initialize fuse_req_key,snap,who,seq Fixes the coverity issues: ** 1351735 Uninitialized scalar field CID 1351735 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member fuse_req_key is not initialized in this constructor nor in any functions that it calls. ** 1396108 Uninitialized scalar field CID 1396108 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member snap is not initialized in this constructor nor in any functions that it calls. ** 1396115 Uninitialized scalar field 2. uninit_member: Non-static class member who is not initialized in this constructor nor in any functions that it calls. CID 1396115 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 4. uninit_member: Non-static class member seq is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Amit Kumar --- diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index d3c54837beae..5dee6eac37ea 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -93,7 +93,7 @@ public: ceph::unordered_map snap_stag_map; ceph::unordered_map stag_snap_map; - pthread_key_t fuse_req_key; + pthread_key_t fuse_req_key = 0; void set_fuse_req(fuse_req_t); fuse_req_t get_fuse_req(); diff --git a/src/test/msgr/test_msgr.cc b/src/test/msgr/test_msgr.cc index 3a9397be9a68..ad9ca091fc69 100644 --- a/src/test/msgr/test_msgr.cc +++ b/src/test/msgr/test_msgr.cc @@ -774,8 +774,8 @@ struct Payload { PING = 0, PONG = 1, }; - uint8_t who; - uint64_t seq; + uint8_t who = 0; + uint64_t seq = 0; bufferlist data; Payload(Who who, uint64_t seq, const bufferlist& data) diff --git a/src/test/osd/RadosModel.h b/src/test/osd/RadosModel.h index b4851c6d3693..ed07a4f4ebc9 100644 --- a/src/test/osd/RadosModel.h +++ b/src/test/osd/RadosModel.h @@ -2314,7 +2314,7 @@ public: string oid; bool dirty; ObjectDesc old_value; - int snap; + int snap = 0; ceph::shared_ptr in_use; IsDirtyOp(int n,