From 37a811b97309502c35efde47bda43a05a32f905b Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Fri, 19 Feb 2021 16:28:58 -0500 Subject: [PATCH] rgw: clean up some compiler warnings Minimal changes to clean up a few compiler warnings. Signed-off-by: J. Eric Ivancich --- src/rgw/rgw_cr_tools.cc | 2 -- src/rgw/rgw_rados.cc | 10 ++++++---- src/rgw/rgw_reshard.cc | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/rgw/rgw_cr_tools.cc b/src/rgw/rgw_cr_tools.cc index e3b8d42aeee3..76428a0d3908 100644 --- a/src/rgw/rgw_cr_tools.cc +++ b/src/rgw/rgw_cr_tools.cc @@ -278,8 +278,6 @@ int RGWBucketLifecycleConfigCR::Request::_send_request() template<> int RGWBucketGetSyncPolicyHandlerCR::Request::_send_request() { - CephContext *cct = store->ctx(); - int r = store->ctl()->bucket->get_sync_policy_handler(params.zone, params.bucket, &result->policy_handler, diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 9c66c3dc6725..97c968ea793c 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4727,10 +4727,11 @@ int RGWRados::set_buckets_enabled(vector& buckets, bool enabled, con for (iter = buckets.begin(); iter != buckets.end(); ++iter) { rgw_bucket& bucket = *iter; - if (enabled) + if (enabled) { ldpp_dout(dpp, 20) << "enabling bucket name=" << bucket.name << dendl; - else + } else { ldpp_dout(dpp, 20) << "disabling bucket name=" << bucket.name << dendl; + } RGWBucketInfo info; map attrs; @@ -5455,10 +5456,11 @@ int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rc } } } - if (s->obj_tag.length()) + if (s->obj_tag.length()) { ldpp_dout(dpp, 20) << "get_obj_state: setting s->obj_tag to " << s->obj_tag.c_str() << dendl; - else + } else { ldpp_dout(dpp, 20) << "get_obj_state: s->obj_tag was set empty" << dendl; + } /* an object might not be olh yet, but could have olh id tag, so we should set it anyway if * it exist, and not only if is_olh() returns true diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index af7037fb3da4..9f85814a2965 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -990,7 +990,6 @@ int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvid string marker; bool truncated = true; - CephContext *cct = store->ctx(); constexpr uint32_t max_entries = 1000; string logshard_oid; -- 2.47.3