Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: kill a compile warning for rgw_sync #10425

Merged
merged 1 commit into from Aug 10, 2016

Conversation

Projects
None yet
2 participants
@theanalyst
Copy link
Member

commented Jul 25, 2016

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 {
            ^
call(new WriteMarkerCR(sync_env->async_rados, store, pool,
sync_env->shard_obj_name(shard_id),
sync_marker));
}

This comment has been minimized.

Copy link
@cbodley

cbodley Aug 8, 2016

Contributor

it looks like the local variable RGWRados *store is the only reason this yield {} block is needed. if you take that out, we can just do this:

            yield call(new WriteMarkerCR(sync_env->async_rados, sync_env->store, pool,
                                         sync_env->shard_obj_name(shard_id),
                                         sync_marker));

This comment has been minimized.

Copy link
@theanalyst

theanalyst Aug 10, 2016

Author Member

what about the sync_marker clearing, can we do this before the yield call ?

This comment has been minimized.

Copy link
@cbodley

cbodley Aug 10, 2016

Contributor

yeah, sync_marker is a member variable. yield is implemented as a switch statement, so you only have to worry about local variable declarations crossing the yield points

@cbodley cbodley self-assigned this Aug 8, 2016

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 <abhishek@suse.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>

@theanalyst theanalyst force-pushed the theanalyst:rgw/sync-paren-warn branch from ce4819c to 831640b Aug 10, 2016

@theanalyst

This comment has been minimized.

Copy link
Member Author

commented Aug 10, 2016

@cbodley updated, and ran through a run of test_multi

@cbodley

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2016

@theanalyst thanks! will merge once jenkins approves

@cbodley cbodley merged commit fa12789 into ceph:master Aug 10, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.