From 0617f433beff7ef272413d4c7149a1727ba35114 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 28 Apr 2026 18:50:38 +0200 Subject: [PATCH] fix: warning: ignored-attributes --- contrib/epee/src/net_ssl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/epee/src/net_ssl.cpp b/contrib/epee/src/net_ssl.cpp index e7d6eb83c..c07f0065a 100644 --- a/contrib/epee/src/net_ssl.cpp +++ b/contrib/epee/src/net_ssl.cpp @@ -686,7 +686,8 @@ std::string get_hr_ssl_fingerprint_from_file(const std::string& cert_path, const const boost::system::error_code err_code(errno, boost::system::system_category()); throw boost::system::system_error(err_code, "Failed to open certificate file '" + cert_path + "'"); } - std::unique_ptr file(fp, &fclose); + auto _fclose = [](FILE* f){ if (f) fclose(f); }; + std::unique_ptr file(fp, _fclose); // Extract certificate structure from file X509* ssl_cert_handle = PEM_read_X509(file.get(), NULL, NULL, NULL);