]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Capability.h: init scalar field in ctor
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 23 Feb 2016 18:29:03 +0000 (19:29 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:45:22 +0000 (14:45 -0500)
Fix for:

CID 1019612 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member before 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 last_issue 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 ec10ae2d353bb32290096ac8c25b2809ec2fcbf2..30b308549a9f19d3c81c72ad49cab31b3e373f9a 100644 (file)
@@ -125,7 +125,7 @@ public:
   struct revoke_info {
     __u32 before;
     ceph_seq_t seq, last_issue;
-    revoke_info() {}
+    revoke_info() : before(0), seq(0), last_issue(0) {}
     revoke_info(__u32 b, ceph_seq_t s, ceph_seq_t li) : before(b), seq(s), last_issue(li) {}
     void encode(bufferlist& bl) const;
     void decode(bufferlist::iterator& bl);