diff options
author | Jeff King <peff@peff.net> | 2023-02-24 06:39:22 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-24 17:13:31 (GMT) |
commit | c50dca2a18077306eb6796938d3d01c76590b4c6 (patch) | |
tree | 56b47fa0f7232df4b5b68b04ac48d8f802ce774e /reachable.c | |
parent | 9ec03b59a8c4f5a0b4e666bd179a8eed71484825 (diff) | |
download | git-c50dca2a18077306eb6796938d3d01c76590b4c6.zip git-c50dca2a18077306eb6796938d3d01c76590b4c6.tar.gz git-c50dca2a18077306eb6796938d3d01c76590b4c6.tar.bz2 |
list-objects: mark unused callback parameters
Our graph-traversal functions take callbacks for showing commits and
objects, but not all callbacks need each parameter. Likewise for the
similar traverse_bitmap_commit_list(), which has a different interface
but serves the same purpose. And the include_check mechanism, which
passes along a void pointer which is not always used.
Mark the unused ones to to make -Wunused-parameter happy.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.c')
-rw-r--r-- | reachable.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/reachable.c b/reachable.c index aba63eb..08f290c 100644 --- a/reachable.c +++ b/reachable.c @@ -48,7 +48,9 @@ static int add_one_ref(const char *path, const struct object_id *oid, * The traversal will have already marked us as SEEN, so we * only need to handle any progress reporting here. */ -static void mark_object(struct object *obj, const char *name, void *data) +static void mark_object(struct object *obj UNUSED, + const char *name UNUSED, + void *data) { update_progress(data); } @@ -202,10 +204,10 @@ int add_unseen_recent_objects_to_traversal(struct rev_info *revs, static int mark_object_seen(const struct object_id *oid, enum object_type type, - int exclude, - uint32_t name_hash, - struct packed_git *found_pack, - off_t found_offset) + int exclude UNUSED, + uint32_t name_hash UNUSED, + struct packed_git *found_pack UNUSED, + off_t found_offset UNUSED) { struct object *obj = lookup_object_by_type(the_repository, oid, type); if (!obj) |