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: silence compile warning from -Wmaybe-uninitialized #15996

Merged
merged 1 commit into from Jul 7, 2017

Conversation

Projects
None yet
3 participants
@mikulely
Contributor

mikulely commented Jun 29, 2017

ceph/src/rgw/rgw_rest.cc: In member function ‘virtual int
RGWHandler_REST::read_permissions(RGWOp*)’:
ceph/src/rgw/rgw_rest.cc:1919:8: warning: ‘only_bucket’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   bool only_bucket;
           ^
	   [100%] Building CXX ob

@@ -1916,7 +1916,7 @@ int RGWHandler_REST::init_permissions(RGWOp* op)
int RGWHandler_REST::read_permissions(RGWOp* op_obj)
{
bool only_bucket;
bool only_bucket = false; // initialized to silence compile warning

This comment has been minimized.

@joscollin

joscollin Jul 4, 2017

Member

LGTM. But please remove the comment.

This comment has been minimized.

@mikulely

mikulely Jul 4, 2017

Contributor

OK, repushed.

rgw: silence compile warning in the rgw_rest.cc
/root/jiaying/ceph/src/rgw/rgw_rest.cc: In member function ‘virtual int
RGWHandler_REST::read_permissions(RGWOp*)’:
/root/jiaying/ceph/src/rgw/rgw_rest.cc:1919:8: warning: ‘only_bucket’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
   bool only_bucket;
           ^
	   [100%] Building CXX ob

Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>

@joscollin joscollin changed the title from rgw: silence compile warning in the rgw_rest.cc to rgw: silence compile warning from -Wmaybe-uninitialized Jul 4, 2017

@joscollin joscollin added the needs-qa label Jul 4, 2017

@yuriw yuriw merged commit 76d32b7 into ceph:master Jul 7, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@mikulely mikulely deleted the mikulely:rgw-rest-complain branch Jul 10, 2017

@mikulely

This comment has been minimized.

Contributor

mikulely commented Jul 10, 2017

Thanks @yuriw @joscollin for merging this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment