Skip to content

Commit

Permalink
MINIFICPP-2506 Fix a gcc warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fgerlits committed Dec 20, 2024
1 parent 25882c1 commit 48c5cee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/python/pythonlibloader/PythonLibLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class PythonLibLoader {
static std::string execCommand(const std::string& cmd) {
std::array<char, 128> buffer{};
std::string result;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(), "r"), pclose);
struct pclose_deleter { void operator()(FILE* file) noexcept { pclose(file); } };
std::unique_ptr<FILE, pclose_deleter> pipe{popen(cmd.c_str(), "r")};
if (!pipe) {
return "";
}
Expand Down

0 comments on commit 48c5cee

Please sign in to comment.