for_each_object: mark unused callback parameters

The for_each_{loose,packed}_object interface uses callback functions,
but not every callback needs all of the parameters. 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>
This commit is contained in:
Jeff King
2023-02-24 01:39:24 -05:00
committed by Junio C Hamano
parent c50dca2a18
commit be252d3349
14 changed files with 56 additions and 45 deletions

View File

@ -98,7 +98,8 @@ static int prune_object(const struct object_id *oid, const char *fullpath,
return 0;
}
static int prune_cruft(const char *basename, const char *path, void *data)
static int prune_cruft(const char *basename, const char *path,
void *data UNUSED)
{
if (starts_with(basename, "tmp_obj_"))
prune_tmp_file(path);
@ -107,7 +108,8 @@ static int prune_cruft(const char *basename, const char *path, void *data)
return 0;
}
static int prune_subdir(unsigned int nr, const char *path, void *data)
static int prune_subdir(unsigned int nr UNUSED, const char *path,
void *data UNUSED)
{
if (!show_only)
rmdir(path);