mark unused parameters in trivial compat functions

When a platform feature isn't available or in use, we sometimes
conditionally compile empty or trivial functions to turn these into
noops. We need to annotate their parameters so that -Wunused-parameters
won't complain about them.

Note that there are many more of these in compat/mingw.h, but we'll
leave them for now, as there's some trickery required to get the UNUSED
macro available there.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2022-10-17 21:05:12 -04:00
committed by Junio C Hamano
parent 827f8305c4
commit 808e91956d
3 changed files with 12 additions and 8 deletions

View File

@ -41,7 +41,7 @@ int enable_pipe_nonblock(int fd)
#else
int enable_pipe_nonblock(int fd)
int enable_pipe_nonblock(int fd UNUSED)
{
errno = ENOSYS;
return -1;