From bcc86c47d97a59d5fc62b8ef4aa4a94c2fadd78a Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Fri, 23 Jun 2017 21:03:11 +0530 Subject: [PATCH] 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 --- src/rgw/rgw_reshard.cc | 2 +- src/rgw/rgw_reshard.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5