summaryrefslogtreecommitdiff
path: root/builtin/ls-tree.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-08-19 06:08:49 -0400
committerJunio C Hamano <gitster@pobox.com>2022-08-19 12:18:56 -0700
commit555ff1c8a4fc3bf4beab0b5bb8774fd607f95111 (patch)
treeeb3641aac61e98cc6644318b853e67e8d317fcdf /builtin/ls-tree.c
parent02c3c59e62a30771d209a171edfc75a4d7387ebe (diff)
downloadgit-555ff1c8a4fc3bf4beab0b5bb8774fd607f95111.tar.gz
mark unused read_tree_recursive() callback parameters
We pass a callback to read_tree_recursive(), but not every callback needs every parameter. Let's mark the unused ones to satisfy -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/ls-tree.c')
-rw-r--r--builtin/ls-tree.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index e279be8bb6..48df337605 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -142,7 +142,7 @@ static int show_recursive(const char *base, size_t baselen, const char *pathname
}
static int show_tree_fmt(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode, void *context)
+ const char *pathname, unsigned mode, void *UNUSED(context))
{
size_t baselen;
int recurse = 0;
@@ -213,7 +213,7 @@ static void show_tree_common_default_long(struct strbuf *base,
static int show_tree_default(const struct object_id *oid, struct strbuf *base,
const char *pathname, unsigned mode,
- void *context)
+ void *UNUSED(context))
{
int early;
int recurse;
@@ -230,7 +230,8 @@ static int show_tree_default(const struct object_id *oid, struct strbuf *base,
}
static int show_tree_long(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode, void *context)
+ const char *pathname, unsigned mode,
+ void *UNUSED(context))
{
int early;
int recurse;
@@ -259,7 +260,8 @@ static int show_tree_long(const struct object_id *oid, struct strbuf *base,
}
static int show_tree_name_only(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode, void *context)
+ const char *pathname, unsigned mode,
+ void *UNUSED(context))
{
int early;
int recurse;
@@ -279,7 +281,8 @@ static int show_tree_name_only(const struct object_id *oid, struct strbuf *base,
}
static int show_tree_object(const struct object_id *oid, struct strbuf *base,
- const char *pathname, unsigned mode, void *context)
+ const char *pathname, unsigned mode,
+ void *UNUSED(context))
{
int early;
int recurse;