]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix compile warning 10014/head
authorWanlong Gao <wanlong.gao@easystack.cn>
Wed, 29 Jun 2016 10:15:58 +0000 (18:15 +0800)
committerWanlong Gao <wanlong.gao@easystack.cn>
Wed, 29 Jun 2016 11:16:41 +0000 (19:16 +0800)
/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>
src/rgw/rgw_rest_swift.cc

index 576b4be465dc824c139b7ba2212fb2c92f51017f..dc803265f78bccef902cacf61b6cad73ff7fca18 100644 (file)
@@ -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)