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
liewegas
merged 2 commits into
ceph:master
from
gaowanlong:indent_caused_compile_warning
Jul 6, 2016
Merged
build: fix wrong indent caused compile warning #10014
liewegas
merged 2 commits into
ceph:master
from
gaowanlong:indent_caused_compile_warning
Jul 6, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
force-pushed
the
indent_caused_compile_warning
branch
from
June 29, 2016 11:22
6cda10e
to
5f8c2bb
Compare
@theanalyst anyone can merge such really simple pr quickly? |
liewegas
changed the title
Fix wrong indent caused compile warning
build: fix wrong indent caused compile warning
Jul 6, 2016
This was referenced Jun 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.