Skip to content

Commit

Permalink
rgw: fix compile warning
Browse files Browse the repository at this point in the history
/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>
  • Loading branch information
gaowanlong committed Jun 29, 2016
1 parent 9057f58 commit 6cda10e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/rgw/rgw_rest_swift.cc
Expand Up @@ -319,17 +319,17 @@ void RGWListBucket_ObjStore_SWIFT::send_response()
if (name.compare(delimiter) == 0)
goto next;

s->formatter->open_object_section_with_attrs("subdir", FormatterAttrs("name", name.c_str(), NULL));

/* swift is a bit inconsistent here */
switch (s->format) {
case RGW_FORMAT_XML:
s->formatter->dump_string("name", name);
break;
default:
s->formatter->dump_string("subdir", name);
}
s->formatter->close_section();
s->formatter->open_object_section_with_attrs("subdir", FormatterAttrs("name", name.c_str(), NULL));

/* swift is a bit inconsistent here */
switch (s->format) {
case RGW_FORMAT_XML:
s->formatter->dump_string("name", name);
break;
default:
s->formatter->dump_string("subdir", name);
}
s->formatter->close_section();
}
next:
if (do_objs)
Expand Down

0 comments on commit 6cda10e

Please sign in to comment.