]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Initialize pointer field in seed
authorJos Collin <jcollin@redhat.com>
Thu, 29 Jun 2017 15:10:36 +0000 (20:40 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 12 Jul 2017 16:03:04 +0000 (21:33 +0530)
Fixes the Coverity Scan Report:
CID 1396116: Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member create_date is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member s is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member store is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/rgw/rgw_torrent.h

index b714bdec075c98a292ae10eb1930afd500dfd5c6..b33aac09b74c779aa6b5d97026b2abe16ea37404 100644 (file)
@@ -96,7 +96,7 @@ private:
 
   string  announce;    // tracker
   string origin; // origin
-  time_t create_date;    // time of the file created
+  time_t create_date{0};    // time of the file created
   string comment;  // comment
   string create_by;    // app name and version
   string encoding;    // if encode use gbk rather than gtf-8 use this field
@@ -104,8 +104,8 @@ private:
   bool is_torrent;  // flag
   bufferlist bl;  // bufflist ready to send
 
-  struct req_state *s;
-  RGWRados *store;
+  struct req_state *s{nullptr};
+  RGWRados *store{nullptr};
   SHA1 h;
 
   TorrentBencode dencode;