From f3d5e330104be4c1150d39305fc0cc0fa13facfe Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Thu, 29 Jun 2017 20:40:36 +0530 Subject: [PATCH] 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 --- src/rgw/rgw_torrent.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.47.3