Skip to content

Commit 65e8141

Browse files
peffgitster
authored andcommitted
compat/mmap: mark unused argument in git_munmap()
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f368df4 commit 65e8141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t of
3838
return start;
3939
}
4040

41-
int git_munmap(void *start, size_t length)
41+
int git_munmap(void *start, size_t length UNUSED)
4242
{
4343
free(start);
4444
return 0;

0 commit comments

Comments
 (0)