From: Jos Collin Date: Thu, 29 Jun 2017 15:10:36 +0000 (+0530) Subject: rgw: Initialize pointer field in seed X-Git-Tag: v12.1.1~41^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f3d5e330104be4c1150d39305fc0cc0fa13facfe;p=ceph.git rgw: Initialize pointer field in seed 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 --- diff --git a/src/rgw/rgw_torrent.h b/src/rgw/rgw_torrent.h index b714bdec075c..b33aac09b74c 100644 --- a/src/rgw/rgw_torrent.h +++ b/src/rgw/rgw_torrent.h @@ -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;