]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/neorados: Silence mismatched new/delete warning 61328/head
authorAdam Emerson <aemerson@redhat.com>
Fri, 10 Jan 2025 21:05:56 +0000 (16:05 -0500)
committerAdam Emerson <aemerson@redhat.com>
Fri, 10 Jan 2025 21:08:16 +0000 (16:08 -0500)
This is a bug in Boost that's fixed in 1.87. Once we upgrade to that,
this can be reverted.

Fixes: https://tracker.ceph.com/issues/64191
Signed-off-by: Adam Emerson <aemerson@redhat.com>
src/test/neorados/common_tests.h

index 9610f08f643f3a45f78c357e9acaf8a8a87fbc77..5c2ebde4db6aae8976eb93530477d6f066e3b229 100644 (file)
@@ -72,6 +72,13 @@ std::string get_temp_pool_name(std::string_view prefix = {});
 /// \param token Boost.Asio completion token
 ///
 /// \return The ID of the newly created pool
+
+// This is a bug in Boost. It's fixed in 1.87 and these pragmata can
+// be removed then.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmismatched-new-delete"
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wmismatched-new-delete"
 template<boost::asio::completion_token_for<
           void(boost::system::error_code, int64_t)> CompletionToken>
 auto create_pool(neorados::RADOS& r,
@@ -95,6 +102,8 @@ auto create_pool(neorados::RADOS& r,
      }, r.get_executor()),
      token, std::ref(r), std::move(pname));
 }
+#pragma GCC diagnostic pop
+#pragma clang diagnostic pop
 
 /// \brief Create a new, empty RADOS object
 ///