Silence warning about ignored attributes

This commit is contained in:
Phillip Stephens 2025-04-25 10:33:07 -07:00
parent 7d7d0e0891
commit d2d54fe6ef
2 changed files with 3 additions and 2 deletions

View File

@ -125,7 +125,7 @@ typedef void (*atEXCEPTION_HANDLER)(athena::error::Level level, const char* /*fi
atEXCEPTION_HANDLER atGetExceptionHandler(); 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. * this function cannot be considered thread-safe, therefore modifying during runtime is not recommended.
*/ */
void atSetExceptionHandler(atEXCEPTION_HANDLER func); void atSetExceptionHandler(atEXCEPTION_HANDLER func);

View File

@ -189,7 +189,8 @@ void MemoryWriter::save(std::string_view filename) {
m_filepath = filename; m_filepath = filename;
} }
std::unique_ptr<FILE, decltype(&std::fclose)> out{std::fopen(m_filepath.c_str(), "wb"), std::fclose}; auto deleter = [](FILE* f) { return std::fclose(f); };
std::unique_ptr<FILE, decltype(deleter)> out{std::fopen(m_filepath.c_str(), "wb"), deleter};
if (!out) { if (!out) {
atError("Unable to open file '{}'", m_filepath); atError("Unable to open file '{}'", m_filepath);
setError(); setError();