diff options
| author | Jeff King <peff@peff.net> | 2023-08-29 19:45:19 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-08-29 17:56:24 -0700 |
| commit | c5cb97cbbf794df9279d408d22ef756504812135 (patch) | |
| tree | d032b0d21175d47135cee8c0f4e4e6b253f070d6 | |
| parent | e1cba404dbe54f2bf0511b3bd480c0e05fb65360 (diff) | |
| download | git-c5cb97cbbf794df9279d408d22ef756504812135.tar.gz | |
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>
| -rw-r--r-- | builtin/ls-tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c index f558db5f3b..209d2dc0d5 100644 --- a/builtin/ls-tree.c +++ b/builtin/ls-tree.c @@ -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) { |
