Skip to content

Commit 316b3a2

Browse files
peffgitster
authored andcommitted
gc: mark unused descriptors in scheduler callbacks
Each of the scheduler update callbacks gets the descriptor of the lock file, but only the crontab updater needs it. We have to retain the unused descriptors because these are dispatched from a table of function pointers, but we should mark them to silence -Wunused-parameter. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fd3fe49 commit 316b3a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/gc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ static int launchctl_add_plists(void)
19341934
launchctl_schedule_plist(exec_path, SCHEDULE_WEEKLY);
19351935
}
19361936

1937-
static int launchctl_update_schedule(int run_maintenance, int fd)
1937+
static int launchctl_update_schedule(int run_maintenance, int fd UNUSED)
19381938
{
19391939
if (run_maintenance)
19401940
return launchctl_add_plists();
@@ -2115,7 +2115,7 @@ static int schtasks_schedule_tasks(void)
21152115
schtasks_schedule_task(exec_path, SCHEDULE_WEEKLY);
21162116
}
21172117

2118-
static int schtasks_update_schedule(int run_maintenance, int fd)
2118+
static int schtasks_update_schedule(int run_maintenance, int fd UNUSED)
21192119
{
21202120
if (run_maintenance)
21212121
return schtasks_schedule_tasks();
@@ -2556,7 +2556,7 @@ static int systemd_timer_setup_units(void)
25562556
return ret;
25572557
}
25582558

2559-
static int systemd_timer_update_schedule(int run_maintenance, int fd)
2559+
static int systemd_timer_update_schedule(int run_maintenance, int fd UNUSED)
25602560
{
25612561
if (run_maintenance)
25622562
return systemd_timer_setup_units();

0 commit comments

Comments
 (0)