hashx: Avoid unused arg warning on OpenBSD and NetBSD

This path in hashx_vm_alloc_huge() for OpenBSD and NetBSD always
fails without checking its parameter. Fix the warning.
This commit is contained in:
Micah Elizabeth Scott 2023-08-25 10:18:44 -07:00
parent 9cac0a85b4
commit ee4e9f7506

View File

@ -107,6 +107,7 @@ void* hashx_vm_alloc_huge(size_t bytes) {
mem = mmap(NULL, bytes, PAGE_READWRITE, MAP_PRIVATE | MAP_ANONYMOUS
| MAP_ALIGNED_SUPER, -1, 0);
#elif defined(__OpenBSD__) || defined(__NetBSD__)
(void)bytes;
mem = MAP_FAILED; // OpenBSD and NetBSD do not support huge pages
#else
mem = mmap(NULL, bytes, PAGE_READWRITE, MAP_PRIVATE | MAP_ANONYMOUS