diff mbox series

[07/21] http-backend: mark unused parameters in virtual functions

Message ID Y/hbc7gsBMXQcpJ+@coredump.intra.peff.net (mailing list archive)
State Accepted
Commit 2be1506a788a24e87ba4b53a1654c9ff40402750
Headers show
Series more -Wunused-parameter fixes | expand

Commit Message

Jeff King Feb. 24, 2023, 6:38 a.m. UTC
The http-backend dispatches requests via a table of virtual functions.
Some of the functions ignore their "arg" parameter, because it's
implicit in the function (e.g., get_info_refs knows that it is
dispatched only for a request to "/info/refs").

Mark these unused parameters to silence -Wunused-parameter.

Signed-off-by: Jeff King <peff@peff.net>
---
 http-backend.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/http-backend.c b/http-backend.c
index fc3ab97c0f..db963e64d7 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -524,7 +524,7 @@  static int show_text_ref(const char *name, const struct object_id *oid,
 	return 0;
 }
 
-static void get_info_refs(struct strbuf *hdr, char *arg)
+static void get_info_refs(struct strbuf *hdr, char *arg UNUSED)
 {
 	const char *service_name = get_parameter("service");
 	struct strbuf buf = STRBUF_INIT;
@@ -578,7 +578,7 @@  static int show_head_ref(const char *refname, const struct object_id *oid,
 	return 0;
 }
 
-static void get_head(struct strbuf *hdr, char *arg)
+static void get_head(struct strbuf *hdr, char *arg UNUSED)
 {
 	struct strbuf buf = STRBUF_INIT;
 
@@ -588,7 +588,7 @@  static void get_head(struct strbuf *hdr, char *arg)
 	strbuf_release(&buf);
 }
 
-static void get_info_packs(struct strbuf *hdr, char *arg)
+static void get_info_packs(struct strbuf *hdr, char *arg UNUSED)
 {
 	size_t objdirlen = strlen(get_object_directory());
 	struct strbuf buf = STRBUF_INIT;