Allow building with boost 1.87
Boost for whatever reason added nodiscard on boost::asio::spawn. Long
term someone likely needs to move this coroutine stuff over to c++20
coroutines, but for now, put in maybe_unused where appropriate.
Change-Id: I72c2039a2bb1e6198a543f89a1820ed3cb78c9df
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/ipmid-new.cpp b/ipmid-new.cpp
index ea833ff..1e85a0d 100644
--- a/ipmid-new.cpp
+++ b/ipmid-new.cpp
@@ -20,6 +20,7 @@
#include <dlfcn.h>
#include <boost/algorithm/string.hpp>
+#include <boost/asio/detached.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/spawn.hpp>
#include <host-cmd-manager.hpp>
@@ -765,7 +766,7 @@
{
// make a copy so the next two moves don't wreak havoc on the stack
sdbusplus::message_t b{m};
- (void)boost::asio::spawn(
+ boost::asio::spawn(
*getIoContext(),
[b = std::move(b)](boost::asio::yield_context yield) {
sdbusplus::message_t m{std::move(b)};
@@ -802,7 +803,7 @@
netFn, "CMD", lg2::hex, cmd);
}
},
- {});
+ boost::asio::detached);
}
#endif /* ALLOW_DEPRECATED_API */