Hi,
When compiled with the default settings, neither FOONATHAN_MEMORY_DEBUG_ASSERT or FOONATHAN_MEMORY_ASSERT is defined.
so this line
#define FOONATHAN_MEMORY_ASSERT_MSG(Expr, Msg)
will be evaluated to empty code and then
|
auto result = VirtualFree(pages, 0u, MEM_RELEASE); |
|
FOONATHAN_MEMORY_ASSERT_MSG(result, "cannot release pages"); |
will have a compiling error (originally warning):
src/foo_mem-ext/src/virtual_memory.cpp: In function 'void foonathan::memory::virtual_memory_release(void*, std::size_t)':
src/foo_mem-ext/src/virtual_memory.cpp:50:10: error: unused variable 'result' [-Werror=unused-variable]
50 | auto result = VirtualFree(pages, 0u, MEM_RELEASE);
| ^~~~~~