Skip to content

Commit

Permalink
rgw: kill a compile warning for rgw_sync
Browse files Browse the repository at this point in the history
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 <abhishek@suse.com>
  • Loading branch information
theanalyst committed Jul 25, 2016
1 parent aacba7f commit ce4819c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/rgw/rgw_sync.cc
Expand Up @@ -1459,17 +1459,19 @@ class RGWMetaSyncShardCR : public RGWCoroutine {

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<rgw_meta_sync_marker>;
call(new WriteMarkerCR(sync_env->async_rados, store, pool,
sync_env->shard_obj_name(shard_id),
sync_marker));
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<rgw_meta_sync_marker>;
call(new WriteMarkerCR(sync_env->async_rados, 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;
Expand Down

0 comments on commit ce4819c

Please sign in to comment.