Skip to content

Commit 3cdddcf

Browse files
peffgitster
authored andcommitted
gc: drop MAYBE_UNUSED annotation from used parameter
The "opts" parameter is always used, so marking it with MAYBE_UNUSED is just confusing. This annotation goes back to 41abfe1 (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 bfc2f9e (builtin/gc: forward git-gc(1)'s `--auto` flag when packing refs, 2024-03-25), nobody noticed. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4590f2e commit 3cdddcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static int pack_refs_condition(UNUSED struct gc_config *cfg)
260260
return 1;
261261
}
262262

263-
static int maintenance_task_pack_refs(MAYBE_UNUSED struct maintenance_run_opts *opts,
263+
static int maintenance_task_pack_refs(struct maintenance_run_opts *opts,
264264
UNUSED struct gc_config *cfg)
265265
{
266266
struct child_process cmd = CHILD_PROCESS_INIT;

0 commit comments

Comments
 (0)