From d2d54fe6efe18a0e3f5195c677cd4f77c79c0330 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 25 Apr 2025 10:33:07 -0700 Subject: [PATCH] Silence warning about ignored attributes --- include/athena/Global.hpp | 2 +- src/athena/MemoryWriter.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/athena/Global.hpp b/include/athena/Global.hpp index 04e2794..c4aea25 100644 --- a/include/athena/Global.hpp +++ b/include/athena/Global.hpp @@ -125,7 +125,7 @@ typedef void (*atEXCEPTION_HANDLER)(athena::error::Level level, const char* /*fi atEXCEPTION_HANDLER atGetExceptionHandler(); /** - * atSetExceptionHandler is only meant to be used a the start and end of an application's lifetime, + * atSetExceptionHandler is only meant to be used at the start and end of an application's lifetime, * this function cannot be considered thread-safe, therefore modifying during runtime is not recommended. */ void atSetExceptionHandler(atEXCEPTION_HANDLER func); diff --git a/src/athena/MemoryWriter.cpp b/src/athena/MemoryWriter.cpp index a3c6b2f..b75b078 100644 --- a/src/athena/MemoryWriter.cpp +++ b/src/athena/MemoryWriter.cpp @@ -189,7 +189,8 @@ void MemoryWriter::save(std::string_view filename) { m_filepath = filename; } - std::unique_ptr out{std::fopen(m_filepath.c_str(), "wb"), std::fclose}; + auto deleter = [](FILE* f) { return std::fclose(f); }; + std::unique_ptr out{std::fopen(m_filepath.c_str(), "wb"), deleter}; if (!out) { atError("Unable to open file '{}'", m_filepath); setError();