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>
maint
Jeff King 2023-08-29 19:45:19 -04:00 committed by Junio C Hamano
parent e1cba404db
commit c5cb97cbbf
1 changed files with 2 additions and 1 deletions

View File

@ -241,7 +241,8 @@ static int show_tree_long(const struct object_id *oid, struct strbuf *base,
return recurse;
}

static int show_tree_name_only(const struct object_id *oid, struct strbuf *base,
static int show_tree_name_only(const struct object_id *oid UNUSED,
struct strbuf *base,
const char *pathname, unsigned mode,
void *context)
{