Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MinGW-GCC8.1)Fix unused variables caused by FOONATHAN_MEMORY_ASSERT_MSG is not d… #189

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chinanewer
Copy link

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
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.

1 participant