Skip to content

Commit bdc71b4

Browse files
peffgitster
authored andcommitted
refs: mark unused parameters in do_for_each_reflog_helper()
This is an each_ref_fn callback, so it has to match that interface. We marked most of these in 63e14ee (refs: mark unused each_ref_fn parameters, 2022-08-19), but in this case: - this function was created in 31f8983 (refs: drop unused params from the reflog iterator callback, 2024-02-21), and most of the arguments were correctly mark as UNUSED, but "flags" was missed. - commit e820771 (refs: add referent to each_ref_fn, 2024-08-09) added a new argument to the each_ref_fn callback. In most callbacks it added an UNUSED annotation, but it missed one case. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d1aa0fc commit bdc71b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

refs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,9 +2390,10 @@ struct do_for_each_reflog_help {
23902390
void *cb_data;
23912391
};
23922392

2393-
static int do_for_each_reflog_helper(const char *refname, const char *referent,
2393+
static int do_for_each_reflog_helper(const char *refname,
2394+
const char *referent UNUSED,
23942395
const struct object_id *oid UNUSED,
2395-
int flags,
2396+
int flags UNUSED,
23962397
void *cb_data)
23972398
{
23982399
struct do_for_each_reflog_help *hp = cb_data;

0 commit comments

Comments
 (0)