Skip to content

Commit 8c5210a

Browse files
chinanewerfoonathan
authored andcommitted
Fix unused variables caused by undefined FOONATHAN_MEMORY_DEBUG_ASSERT
Fixes #183, #184, #189.
1 parent 0713893 commit 8c5210a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/virtual_memory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ void foonathan::memory::virtual_memory_release(void* pages, std::size_t) noexcep
4949
{
5050
auto result = VirtualFree(pages, 0u, MEM_RELEASE);
5151
FOONATHAN_MEMORY_ASSERT_MSG(result, "cannot release pages");
52+
(void)result;
5253
}
5354

5455
void* foonathan::memory::virtual_memory_commit(void* memory, std::size_t no_pages) noexcept
@@ -70,6 +71,7 @@ void foonathan::memory::virtual_memory_decommit(void* memory, std::size_t no_pag
7071
{
7172
auto result = VirtualFree(memory, no_pages * virtual_memory_page_size, MEM_DECOMMIT);
7273
FOONATHAN_MEMORY_ASSERT_MSG(result, "cannot decommit memory");
74+
(void)result;
7375
}
7476
#elif defined(__unix__) || defined(__APPLE__) || defined(__VXWORKS__) \
7577
|| defined(__QNXNTO__) // POSIX systems

0 commit comments

Comments
 (0)