diff options
author | Jeff King <peff@peff.net> | 2023-02-24 07:39:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-24 18:13:32 +0100 |
commit | 3c50c88f426dddd6c4cb1c1ae847a1eddd5eafee (patch) | |
tree | 83c6d8d389894065f3377d71a39df7e56b1cbc3c /notes.c | |
parent | prio-queue: mark unused parameters in comparison functions (diff) | |
download | git-3c50c88f426dddd6c4cb1c1ae847a1eddd5eafee.tar.xz git-3c50c88f426dddd6c4cb1c1ae847a1eddd5eafee.zip |
notes: mark unused callback parameters
for_each_note() requires a callback, but not all callbacks need all of
the parameters. Likewise, init_notes() takes a callback to implement the
"combine" strategy, but the "ignore" variant obviously doesn't look at
its arguments at all. Mark unused parameters as appropriate to silence
compiler warnings.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes.c')
-rw-r--r-- | notes.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -752,7 +752,7 @@ static int write_each_non_note_until(const char *note_path, return 0; } -static int write_each_note(const struct object_id *object_oid, +static int write_each_note(const struct object_id *object_oid UNUSED, const struct object_id *note_oid, char *note_path, void *cb_data) { @@ -780,8 +780,9 @@ struct note_delete_list { }; static int prune_notes_helper(const struct object_id *object_oid, - const struct object_id *note_oid, char *note_path, - void *cb_data) + const struct object_id *note_oid UNUSED, + char *note_path UNUSED, + void *cb_data) { struct note_delete_list **l = (struct note_delete_list **) cb_data; struct note_delete_list *n; @@ -848,8 +849,8 @@ int combine_notes_overwrite(struct object_id *cur_oid, return 0; } -int combine_notes_ignore(struct object_id *cur_oid, - const struct object_id *new_oid) +int combine_notes_ignore(struct object_id *cur_oid UNUSED, + const struct object_id *new_oid UNUSED) { return 0; } |