hwmon_ffdc: fix compile fail with newer glibc
An upcoming Yocto update reveiled a compile failure due to ignoring the
return value from `pclose` when used as a unique_ptr deleter. Switch
to a lambda indirection where the return is explicitly ignored.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ifa5d3f346f75d37075df78acf916dde8fc1ead69
diff --git a/hwmon_ffdc.cpp b/hwmon_ffdc.cpp
index cd8417a..77043f3 100644
--- a/hwmon_ffdc.cpp
+++ b/hwmon_ffdc.cpp
@@ -22,8 +22,10 @@
std::vector<std::string> output;
std::array<char, 128> buffer;
- std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(command.c_str(), "r"),
- pclose);
+ auto pipe_close = [](auto fd) { (void)pclose(fd); };
+
+ std::unique_ptr<FILE, decltype(pipe_close)> pipe(
+ popen(command.c_str(), "r"), pipe_close);
if (!pipe)
{
getLogger().log(