From 6afe3efa4b636ede1cd77086cb2e70ed09fa2e95 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Mon, 25 Jul 2016 11:21:11 +0200 Subject: [PATCH] rgw: kill a compile warning for rgw_sync MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit killing the compile warning for ``` /ceph/src/rgw/rgw_sync.cc:1462:12: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] if (can_adjust_marker) yield { ^ ``` Signed-off-by: Abhishek Lekshmanan Signed-off-by: Casey Bodley (cherry picked from commit 831640bb46621a6f003ad562cef7928ffa9a7ad3) --- src/rgw/rgw_sync.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 3128a18e455a4..e356b3b6d3231 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -1452,18 +1452,18 @@ public: if (!lost_lock) { /* update marker to reflect we're done with full sync */ - if (can_adjust_marker) yield { - sync_marker.state = rgw_meta_sync_marker::IncrementalSync; - sync_marker.marker = sync_marker.next_step_marker; - sync_marker.next_step_marker.clear(); - - RGWRados *store = sync_env->store; - ldout(sync_env->cct, 0) << *this << ": saving marker pos=" << sync_marker.marker << dendl; - using WriteMarkerCR = RGWSimpleRadosWriteCR; - call(new WriteMarkerCR(sync_env->async_rados, store, pool, - sync_env->shard_obj_name(shard_id), - sync_marker)); + if (can_adjust_marker) { + sync_marker.state = rgw_meta_sync_marker::IncrementalSync; + sync_marker.marker = sync_marker.next_step_marker; + sync_marker.next_step_marker.clear(); + ldout(sync_env->cct, 0) << *this << ": saving marker pos=" << sync_marker.marker << dendl; + + using WriteMarkerCR = RGWSimpleRadosWriteCR; + yield call(new WriteMarkerCR(sync_env->async_rados, sync_env->store, + pool, sync_env->shard_obj_name(shard_id), + sync_marker)); } + if (retcode < 0) { ldout(sync_env->cct, 0) << "ERROR: failed to set sync marker: retcode=" << retcode << dendl; return retcode; -- 2.47.3