gc: mark unused config parameter in virtual functions

Commit d1ae15d68b (builtin/gc: refactor to read config into structure, 2024-08-16) added a new parameter to the maintenance_task virtual functions, but most of them don't need to look at it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Aug 27, 2024 at 23:57 UTC 551e4de8e1f08aa90218c94647a3897faf002671
1 file changed +8 -8
builtin/gc.c
+8 -8
@@ -967,7 +967,7 @@ static int dfs_on_ref(const char *refname UNUSED,
967 return result;
968 }
969
970 -static int should_write_commit_graph(struct gc_config *cfg)
970 +static int should_write_commit_graph(struct gc_config *cfg UNUSED)
971 {
972 int result;
973 struct cg_auto_data data;
@@ -1005,7 +1005,7 @@ static int run_write_commit_graph(struct maintenance_run_opts *opts)
1005 }
1006
1007 static int maintenance_task_commit_graph(struct maintenance_run_opts *opts,
1008 - struct gc_config *cfg)
1008 + struct gc_config *cfg UNUSED)
1009 {
1010 prepare_repo_settings(the_repository);
1011 if (!the_repository->settings.core_commit_graph)
@@ -1040,7 +1040,7 @@ static int fetch_remote(struct remote *remote, void *cbdata)
1040 }
1041
1042 static int maintenance_task_prefetch(struct maintenance_run_opts *opts,
1043 - struct gc_config *cfg)
1043 + struct gc_config *cfg UNUSED)
1044 {
1045 if (for_each_remote(fetch_remote, opts)) {
1046 error(_("failed to prefetch remotes"));
@@ -1051,7 +1051,7 @@ static int maintenance_task_prefetch(struct maintenance_run_opts *opts,
1051 }
1052
1053 static int maintenance_task_gc(struct maintenance_run_opts *opts,
1054 - struct gc_config *cfg)
1054 + struct gc_config *cfg UNUSED)
1055 {
1056 struct child_process child = CHILD_PROCESS_INIT;
1057
@@ -1100,7 +1100,7 @@ static int loose_object_count(const struct object_id *oid UNUSED,
1100 return 0;
1101 }
1102
1103 -static int loose_object_auto_condition(struct gc_config *cfg)
1103 +static int loose_object_auto_condition(struct gc_config *cfg UNUSED)
1104 {
1105 int count = 0;
1106
@@ -1192,12 +1192,12 @@ static int pack_loose(struct maintenance_run_opts *opts)
1192 }
1193
1194 static int maintenance_task_loose_objects(struct maintenance_run_opts *opts,
1195 - struct gc_config *cfg)
1195 + struct gc_config *cfg UNUSED)
1196 {
1197 return prune_packed(opts) || pack_loose(opts);
1198 }
1199
1200 -static int incremental_repack_auto_condition(struct gc_config *cfg)
1200 +static int incremental_repack_auto_condition(struct gc_config *cfg UNUSED)
1201 {
1202 struct packed_git *p;
1203 int incremental_repack_auto_limit = 10;
@@ -1317,7 +1317,7 @@ static int multi_pack_index_repack(struct maintenance_run_opts *opts)
1317 }
1318
1319 static int maintenance_task_incremental_repack(struct maintenance_run_opts *opts,
1320 - struct gc_config *cfg)
1320 + struct gc_config *cfg UNUSED)
1321 {
1322 prepare_repo_settings(the_repository);
1323 if (!the_repository->settings.core_multi_pack_index) {