Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-02-24 09:39:24 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-24 20:13:31 +0300
commitbe252d3349f1a5fdf7aaf53390f3ce555b5de9d9 (patch)
treecbab0651cb209f42533cf15cd5a738eac71c617b /builtin/gc.c
parentc50dca2a18077306eb6796938d3d01c76590b4c6 (diff)
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>
Diffstat (limited to 'builtin/gc.c')
-rw-r--r--builtin/gc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/gc.c b/builtin/gc.c
index 02455fdcd7..4486438624 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -976,9 +976,9 @@ struct write_loose_object_data {
static int loose_object_auto_limit = 100;
-static int loose_object_count(const struct object_id *oid,
- const char *path,
- void *data)
+static int loose_object_count(const struct object_id *oid UNUSED,
+ const char *path UNUSED,
+ void *data)
{
int *count = (int*)data;
if (++(*count) >= loose_object_auto_limit)
@@ -1003,15 +1003,15 @@ static int loose_object_auto_condition(void)
NULL, NULL, &count);
}
-static int bail_on_loose(const struct object_id *oid,
- const char *path,
- void *data)
+static int bail_on_loose(const struct object_id *oid UNUSED,
+ const char *path UNUSED,
+ void *data UNUSED)
{
return 1;
}
static int write_loose_object_to_stdin(const struct object_id *oid,
- const char *path,
+ const char *path UNUSED,
void *data)
{
struct write_loose_object_data *d = (struct write_loose_object_data *)data;