]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados: do not use assert() for its side effect
authorKefu Chai <kchai@redhat.com>
Sun, 19 Aug 2018 04:16:24 +0000 (12:16 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 19 Aug 2018 08:42:40 +0000 (16:42 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/librados/test_common.cc

index f617fa6bca7e034826c2ef9e6f2b84425ff2dff0..f8f7de7906af87403d12311538184452ec40dd25 100644 (file)
@@ -44,7 +44,8 @@ int wait_for_healthy(rados_t *cluster)
     rados_buffer_free(outbuf);
 
     json_spirit::mValue root;
-    assert(json_spirit::read(out, root));
+    [[maybe_unused]] bool json_parse_success = json_spirit::read(out, root);
+    assert(json_parse_success);
     json_spirit::mObject root_obj = root.get_obj();
     json_spirit::mObject pgmap = root_obj["pgmap"].get_obj();
     json_spirit::mArray pgs_by_state = pgmap["pgs_by_state"].get_array();