Fix build issue on Nuvoton
It isn't clear why only Nuvoton sees this issue, but this line is
failing with:
```
| /usr/include/c++/15.1.0/bits/char_traits.h:429:49: error: '__builtin_memcpy' reading 18 bytes from a region of size 16 [-Werror=stringop-overread]
| ../git/transporthandler.cpp: In function 'setMACProperty':
| ../git/transporthandler.cpp:222:35: note: at offset 16 into source object '<anonymous>' of size 32
| 222 | stdplus::toStr(mac));
```
I suspect it's getting confused by the rvalue at some level, and
the stdplus ToStr buffers take some effort to understand.
This issue is fixed by simply loading the value onto the stack in a
std::string, which arguably is less efficient because of the copy, but
it's unlikely we'll ever see impact.
Change-Id: Ib14f4a577c5a973bbe8893c9242397e34a206ad2
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/transporthandler.cpp b/transporthandler.cpp
index df4e396..c9a7492 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -218,8 +218,9 @@
void setMACProperty(sdbusplus::bus_t& bus, const ChannelParams& params,
stdplus::EtherAddr mac)
{
+ std::string macStr = stdplus::toStr(mac);
setDbusProperty(bus, params.service, params.ifPath, INTF_MAC, "MACAddress",
- stdplus::toStr(mac));
+ macStr);
}
void deleteObjectIfExists(sdbusplus::bus_t& bus, const std::string& service,