mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
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:
parent
9cac0a85b4
commit
ee4e9f7506
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user