]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client,osd,test: Initialize fuse_req_key,snap,who,seq 17772/head
authoramitkuma <amitkuma@redhat.com>
Mon, 18 Sep 2017 12:37:18 +0000 (18:07 +0530)
committeramitkuma <amitkuma@redhat.com>
Mon, 18 Sep 2017 12:37:18 +0000 (18:07 +0530)
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 <amitkuma@redhat.com>
src/client/fuse_ll.cc
src/test/msgr/test_msgr.cc
src/test/osd/RadosModel.h

index d3c54837beaeca27aee3e32be140239806a55fe5..5dee6eac37ea9f7ecbc80c3d3fb22455a27937eb 100644 (file)
@@ -93,7 +93,7 @@ public:
   ceph::unordered_map<uint64_t,int> snap_stag_map;
   ceph::unordered_map<int,uint64_t> 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();
 
index 3a9397be9a689bb88500a7b6d56bfaef540ca5ff..ad9ca091fc69480c99b95dfab0bfd23b2968429d 100644 (file)
@@ -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)
index b4851c6d36933d620a11a3e005556fe4055c417e..ed07a4f4ebc90495397467fa6e7c6a7677f39370 100644 (file)
@@ -2314,7 +2314,7 @@ public:
   string oid;
   bool dirty;
   ObjectDesc old_value;
-  int snap;
+  int snap = 0;
   ceph::shared_ptr<int> in_use;
 
   IsDirtyOp(int n,