]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/seastore: do not put braces around scalar initializer
authorKefu Chai <kchai@redhat.com>
Wed, 28 Apr 2021 08:17:55 +0000 (16:17 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 28 Apr 2021 12:54:22 +0000 (20:54 +0800)
this change silences the warning from clang like:

src/test/crimson/seastore/onode_tree/test_value.h:152:12: warning: braces around scalar initializer [-Wbraced-scalar-init]
     return {static_cast<value_size_t>(size - sizeof(value_header_t))};
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/crimson/seastore/onode_tree/test_value.h

index bf2a15abb1241e5856da949e04fee2e7bad5e4ff..4b264cea518985947950999913408294d1787d8d 100644 (file)
@@ -149,7 +149,7 @@ struct test_item_t {
 
   value_size_t get_payload_size() const {
     assert(size > sizeof(value_header_t));
-    return {static_cast<value_size_t>(size - sizeof(value_header_t))};
+    return static_cast<value_size_t>(size - sizeof(value_header_t));
   }
 
   void initialize(Transaction& t, TestValue& value) const {