From: Jos Collin Date: Fri, 23 Jun 2017 15:33:11 +0000 (+0530) Subject: rgw: initialize Non-static class member worker in RGWReshard X-Git-Tag: v12.1.1~248^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bcc86c47d97a59d5fc62b8ef4aa4a94c2fadd78a;p=ceph-ci.git rgw: initialize Non-static class member worker in RGWReshard Fixes the Coverity Scan Report: CID 1412616 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) 2. uninit_member: Non-static class member worker is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Jos Collin --- diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index adf3351dc55..12c324e7219 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -885,7 +885,7 @@ void RGWReshard::stop_processor() worker->join(); } delete worker; - worker = NULL; + worker = nullptr; } void *RGWReshard::ReshardWorker::entry() { diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h index 9873707f97d..8c1734b8951 100644 --- a/src/rgw/rgw_reshard.h +++ b/src/rgw/rgw_reshard.h @@ -78,7 +78,7 @@ protected: void stop(); }; - ReshardWorker *worker; + ReshardWorker *worker = nullptr; std::atomic down_flag = { false }; string get_logshard_key(const string& tenant, const string& bucket_name);