]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Capability.h: init non-static Export members in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 23 Feb 2016 13:26:48 +0000 (14:26 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:45:22 +0000 (14:45 -0500)
Fix for:

CID 717232 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member cap_id is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member wanted is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member issued is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member pending is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member seq is not initialized in
  this constructor nor in any functions that it calls.
 uninit_member: Non-static class member mseq is not initialized
  in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mds/Capability.h

index 7f1b5b8d81cca95cceea0e8b732b827946f87059..4f8508c95d72f0372d6d250240c0f53342d864d9 100644 (file)
@@ -86,7 +86,7 @@ public:
     ceph_seq_t seq;
     ceph_seq_t mseq;
     utime_t last_issue_stamp;
-    Export() {}
+    Export() : cap_id(0), wanted(0), issued(0), pending(0), seq(0), mseq(0) {}
     Export(int64_t id, int w, int i, int p, snapid_t cf, ceph_seq_t s, ceph_seq_t m, utime_t lis) :
       cap_id(id), wanted(w), issued(i), pending(p), client_follows(cf),
       seq(s), mseq(m), last_issue_stamp(lis) {}