From 487ecd7141cf0708f14a11d82bb5b2cd63df3225 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 19 Aug 2018 12:16:24 +0800 Subject: [PATCH] test/librados: do not use assert() for its side effect Signed-off-by: Kefu Chai --- src/test/librados/test_common.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/librados/test_common.cc b/src/test/librados/test_common.cc index f617fa6bca7e0..f8f7de7906af8 100644 --- a/src/test/librados/test_common.cc +++ b/src/test/librados/test_common.cc @@ -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(); -- 2.39.5