From: Wanlong Gao Date: Wed, 29 Jun 2016 10:15:58 +0000 (+0800) Subject: rgw: fix compile warning X-Git-Tag: ses5-milestone5~491^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5f8c2bbd40e9e2f327e3ee5d0a21a227f3a76d04;p=ceph.git rgw: fix compile warning /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 --- diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index 576b4be465dc..dc803265f78b 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -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)