ls-tree: mark unused parameter in callback

The formatting functions are dispatched from a table of function pointers. The "path name only" function unsurprisingly does not need to look at its "oid" parameter, but we must mark it as unused to make -Wunused-parameter happy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Aug 29, 2023 at 19:45 UTC c5cb97cbbf794df9279d408d22ef756504812135
1 file changed +2 -1
builtin/ls-tree.c
+2 -1
@@ -241,7 +241,8 @@ static int show_tree_long(const struct object_id *oid, struct strbuf *base,
241 return recurse;
242 }
243
244 -static int show_tree_name_only(const struct object_id *oid, struct strbuf *base,
244 +static int show_tree_name_only(const struct object_id *oid UNUSED,
245 + struct strbuf *base,
246 const char *pathname, unsigned mode,
247 void *context)
248 {