From: Jeff King Date: Wed, 12 Nov 2025 07:56:52 GMT Subject: [PATCH 1/9] compat/mmap: mark unused argument in git_munmap() Message-ID: <20251112075652.GA979063@coredump.intra.peff.net> In-Reply-To: <20251112075522.GA978866@coredump.intra.peff.net> Our mmap compat code emulates mapping by using malloc/free. Our git_munmap() must take a "length" parameter to match the interface of munmap(), but we don't use it (it is up to the allocator to know how big the block is in free()). Let's mark it as UNUSED to avoid complaints from -Wunused-parameter. Otherwise you cannot build with "make DEVELOPER=1 NO_MMAP=1". Signed-off-by: Jeff King --- This made me wonder if nobody is using NO_MMAP at all. But it may just be that platforms which need it are not using -Werror in the first place. compat/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mmap.c b/compat/mmap.c index 2fe1c7732e..1a118711f7 100644 --- a/compat/mmap.c +++ b/compat/mmap.c @@ -38,7 +38,7 @@ void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t of return start; } -int git_munmap(void *start, size_t length) +int git_munmap(void *start, size_t length UNUSED) { free(start); return 0; -- 2.52.0.rc1.260.g3e4993586f