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

build: fix wrong indent caused compile warning #10014

Merged
merged 2 commits into from Jul 6, 2016

Conversation

gaowanlong
Copy link
Contributor

No description provided.

@@ -692,14 +692,14 @@ bool RocksDBStore::RocksDBWholeSpaceIteratorImpl::valid()
int RocksDBStore::RocksDBWholeSpaceIteratorImpl::next()
{
if (valid())
dbiter->Next();
dbiter->Next();
return dbiter->status().ok() ? 0 : -1;
}
int RocksDBStore::RocksDBWholeSpaceIteratorImpl::prev()
{
if (valid())
dbiter->Prev();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add {} around the if as well.. so that we're explicit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theanalyst yeah, updated now.

/git/ceph/src/kv/RocksDBStore.cc:700:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if (valid())
   ^~
/git/ceph/src/kv/RocksDBStore.cc:702:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
     return dbiter->status().ok() ? 0 : -1;
     ^~~~~~

Signed-off-by: Wanlong Gao <wanlong.gao@easystack.cn>
/git/ceph/src/rgw/rgw_rest_swift.cc: In member function ‘virtual void RGWListBucket_ObjStore_SWIFT::send_response()’:
/git/ceph/src/rgw/rgw_rest_swift.cc:319:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
       if (name.compare(delimiter) == 0)
       ^~
/git/ceph/src/rgw/rgw_rest_swift.cc:322:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         s->formatter->open_object_section_with_attrs("subdir", FormatterAttrs("name", name.c_str(), NULL));
         ^

Signed-off-by: Wanlong Gao <wanlong.gao@easystack.cn>
@gaowanlong gaowanlong force-pushed the indent_caused_compile_warning branch from 6cda10e to 5f8c2bb Compare June 29, 2016 11:22
@gaowanlong
Copy link
Contributor Author

@theanalyst anyone can merge such really simple pr quickly?

@gaowanlong
Copy link
Contributor Author

@liewegas

@liewegas liewegas changed the title Fix wrong indent caused compile warning build: fix wrong indent caused compile warning Jul 6, 2016
@liewegas liewegas merged commit 58bd756 into ceph:master Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants