]> git.ipfire.org Git - thirdparty/git.git/commitdiff
daemon: mark unused parameters in non-posix fallbacks
authorJeff King <peff@peff.net>
Sat, 17 Aug 2024 08:25:32 +0000 (04:25 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 17 Aug 2024 16:46:24 +0000 (09:46 -0700)
If NO_POSIX_GOODIES is set, we compile fallback versions of a few
functions. These don't do anything, so their parameters are unused, but
we must keep them to match the ones on the other side of the #ifdef.
Mark them to quiet -Wunused-parameter.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon.c

index 17d331b2f38465e295c019e534eff371ef3e6e49..428a445559a22e043f58a2b6d321054e28b00bcb 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -1175,13 +1175,13 @@ static int service_loop(struct socketlist *socklist)
 
 struct credentials;
 
-static void drop_privileges(struct credentials *cred)
+static void drop_privileges(struct credentials *cred UNUSED)
 {
        /* nothing */
 }
 
-static struct credentials *prepare_credentials(const char *user_name,
-    const char *group_name)
+static struct credentials *prepare_credentials(const char *user_name UNUSED,
+                                              const char *group_name UNUSED)
 {
        die("--user not supported on this platform");
 }