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/dbus-sdr/storagecommands.cpp b/dbus-sdr/storagecommands.cpp
index d169367..3d16344 100644
--- a/dbus-sdr/storagecommands.cpp
+++ b/dbus-sdr/storagecommands.cpp
@@ -20,6 +20,7 @@
#include "selutility.hpp"
#include <boost/algorithm/string.hpp>
+#include <boost/asio/detached.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/process.hpp>
#include <ipmid/api.hpp>
@@ -346,11 +347,12 @@
});
// call once to populate
- (void)boost::asio::spawn(*getIoContext(),
- [](boost::asio::yield_context yield) {
- replaceCacheFru(getSdBus(), yield);
- },
- {});
+ boost::asio::spawn(
+ *getIoContext(),
+ [](boost::asio::yield_context yield) {
+ replaceCacheFru(getSdBus(), yield);
+ },
+ boost::asio::detached);
}
/** @brief implements the read FRU data command