diff options
author | Micah Elizabeth Scott <beth@torproject.org> | 2023-08-25 10:18:44 -0700 |
---|---|---|
committer | Micah Elizabeth Scott <beth@torproject.org> | 2023-08-28 10:11:00 -0700 |
commit | ee4e9f7506d87be71fb85e0bce0a671f541ff059 (patch) | |
tree | 6c9c8001dfe2b5c867b79abf11a5ca270ac93248 | |
parent | 9cac0a85b4f62caf458bd44d5030ce6edfd12365 (diff) | |
download | tor-ee4e9f7506d87be71fb85e0bce0a671f541ff059.tar.gz tor-ee4e9f7506d87be71fb85e0bce0a671f541ff059.zip |
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.
-rw-r--r-- | src/ext/equix/hashx/src/virtual_memory.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ext/equix/hashx/src/virtual_memory.c b/src/ext/equix/hashx/src/virtual_memory.c index 40540a2660..a3a68f44b9 100644 --- a/src/ext/equix/hashx/src/virtual_memory.c +++ b/src/ext/equix/hashx/src/virtual_memory.c @@ -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 |