Skip to content

Conversation

@chinanewer
Copy link
Contributor

When I compile the code using mingw64 (GCC 8.1), the following error occurs:

.../src/virtual_memory.cpp
.../src/virtual_memory.cpp: In function 'void foonathan::memory::virtual_memory_release(void*, std::size_t)':
.../src/v0.7-3-8e7bcb82b7.clean/src/virtual_memory.cpp:50:10: error: unused variable 'result' [-Werror=unused-variable]
     auto result = VirtualFree(pages, 0u, MEM_RELEASE);
          ^~~~~~
.../src/v0.7-3-8e7bcb82b7.clean/src/virtual_memory.cpp: In function 'void foonathan::memory::virtual_memory_decommit(void*, std::size_t)':
.../src/virtual_memory.cpp:71:10: error: unused variable 'result' [-Werror=unused-variable]
     auto result = VirtualFree(memory, no_pages * virtual_memory_page_size, MEM_DECOMMIT);
          ^~~~~~
cc1plus.exe: all warnings being treated as errors

like issues-183 and pull-184 as mentioned, however, he has only repaired one problem. There are two of the same problems, and here is another.

@chinanewer chinanewer changed the title (MinGW-GCC8.1)Fix unused variables caused by FOONATHAN_MEMORY_DEBUG_ASSERT is not d… (MinGW-GCC8.1)Fix unused variables caused by FOONATHAN_MEMORY_ASSERT_MSG is not d… Feb 8, 2025
@foonathan
Copy link
Owner

Thank you, I've merged it manually.

@foonathan foonathan closed this May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants