From 5f8c2bbd40e9e2f327e3ee5d0a21a227f3a76d04 Mon Sep 17 00:00:00 2001 From: Wanlong Gao Date: Wed, 29 Jun 2016 18:15:58 +0800 Subject: [PATCH] rgw: fix compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit /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 --- src/rgw/rgw_rest_swift.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index 576b4be465d..dc803265f78 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) -- 2.47.3