From 48c5cee869630b2137c2b18229e9e78001c948c9 Mon Sep 17 00:00:00 2001 From: Ferenc Gerlits Date: Fri, 20 Dec 2024 17:20:42 +0100 Subject: [PATCH] MINIFICPP-2506 Fix a gcc warning --- extensions/python/pythonlibloader/PythonLibLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/python/pythonlibloader/PythonLibLoader.cpp b/extensions/python/pythonlibloader/PythonLibLoader.cpp index 6407982e37..8c2d7ec551 100644 --- a/extensions/python/pythonlibloader/PythonLibLoader.cpp +++ b/extensions/python/pythonlibloader/PythonLibLoader.cpp @@ -75,7 +75,8 @@ class PythonLibLoader { static std::string execCommand(const std::string& cmd) { std::array buffer{}; std::string result; - std::unique_ptr pipe(popen(cmd.c_str(), "r"), pclose); + struct pclose_deleter { void operator()(FILE* file) noexcept { pclose(file); } }; + std::unique_ptr pipe{popen(cmd.c_str(), "r")}; if (!pipe) { return ""; }