fix ci (gcc quirks)
The compiler used seems to have trouble with combined destructuring
assignment and coroutines.
```
C++ compiler for the host machine: c++ (gcc 15.0.1 "c++ (Ubuntu 15-20250404-0ubuntu1) 15.0.1 20250404 (experimental) [master r15-9193-g08e803aa9be]")
```
```
../src/gpio-presence/config_provider.cpp: In function ‘void gpio_presence::ConfigProvider::handleInterfacesAdded(_ZN13gpio_presence14ConfigProvider21handleInterfacesAddedESt8functionIFvRKN9sdbusplus7message7details19string_path_wrapperEEE.Frame*)’:
../src/gpio-presence/config_provider.cpp:120:5: error: ‘<anonymous>’ may be used uninitialized [-Werror=maybe-uninitialized]
120 | }
| ^
../src/gpio-presence/config_provider.cpp:103:68: note: ‘<anonymous>’ was declared here
103 | .next<sdbusplus::message::object_path, ConfigData>();
| ^
```
Apply the band-aid of using a local variable then destructure later.
Tested: Inspection only.
Change-Id: I314d3ee241afe963f730f4c3978fb8f467a2913a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/gpio-presence/config_provider.cpp b/src/gpio-presence/config_provider.cpp
index 7948802..2f522b4 100644
--- a/src/gpio-presence/config_provider.cpp
+++ b/src/gpio-presence/config_provider.cpp
@@ -98,9 +98,10 @@
while (!ctx.stop_requested())
{
- auto [objPath, intfMap] =
- co_await addedMatch
- .next<sdbusplus::message::object_path, ConfigData>();
+ auto tmp = co_await addedMatch
+ .next<sdbusplus::message::object_path, ConfigData>();
+
+ auto [objPath, intfMap] = std::move(tmp);
debug("Detected interface added on {OBJPATH}", "OBJPATH", objPath);
@@ -130,9 +131,9 @@
while (!ctx.stop_requested())
{
- auto [objectPath, interfaces] =
- co_await removedMatch.next<sdbusplus::message::object_path,
- std::vector<std::string>>();
+ auto tmp = co_await removedMatch.next<sdbusplus::message::object_path,
+ std::vector<std::string>>();
+ auto [objectPath, interfaces] = std::move(tmp);
if (!std::ranges::contains(interfaces, interface))
{