From: Abhishek Lekshmanan Date: Mon, 25 Jul 2016 09:21:11 +0000 (+0200) Subject: rgw: kill a compile warning for rgw_sync X-Git-Tag: ses5-milestone5~156^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=831640bb46621a6f003ad562cef7928ffa9a7ad3;p=ceph.git rgw: kill a compile warning for rgw_sync 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 --- diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index f7b419be77f9..e0506650f77c 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -1459,18 +1459,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;