From ee4e9f7506d87be71fb85e0bce0a671f541ff059 Mon Sep 17 00:00:00 2001 From: Micah Elizabeth Scott Date: Fri, 25 Aug 2023 10:18:44 -0700 Subject: 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. --- src/ext/equix/hashx/src/virtual_memory.c | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3-54-g00ecf