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>
This commit is contained in:
Jeff King
2023-02-24 01:39:22 -05:00
committed by Junio C Hamano
parent 9ec03b59a8
commit c50dca2a18
4 changed files with 22 additions and 17 deletions

View File

@@ -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)