Message ID | 20240829200833.GA432235@coredump.intra.peff.net (mailing list archive) |
---|---|
State | Accepted |
Commit | 3cdddcf6b220cb6097b00ff7df1e4d0277ec43c4 |
Headers | show |
Series | clean up some MAYBE_UNUSED cases | expand |
diff --git a/builtin/gc.c b/builtin/gc.c index 0e361253e3..7dac971405 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -260,7 +260,7 @@ static int pack_refs_condition(UNUSED struct gc_config *cfg) return 1; } -static int maintenance_task_pack_refs(MAYBE_UNUSED struct maintenance_run_opts *opts, +static int maintenance_task_pack_refs(struct maintenance_run_opts *opts, UNUSED struct gc_config *cfg) { struct child_process cmd = CHILD_PROCESS_INIT;
The "opts" parameter is always used, so marking it with MAYBE_UNUSED is just confusing. This annotation goes back to 41abfe15d9 (maintenance: add pack-refs task, 2021-02-09), when it really was unused. Back then we did not have the UNUSED macro that would complain if the code changed to use the parameter. So when we started using it in bfc2f9eb8e (builtin/gc: forward git-gc(1)'s `--auto` flag when packing refs, 2024-03-25), nobody noticed. Signed-off-by: Jeff King <peff@peff.net> --- builtin/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)