Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-02-24 09:39:31 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-24 20:13:32 +0300
commit3c50c88f426dddd6c4cb1c1ae847a1eddd5eafee (patch)
tree83c6d8d389894065f3377d71a39df7e56b1cbc3c /notes.c
parent1758712248ab134a99cf73dcb62c115d955697d8 (diff)
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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/notes.c b/notes.c
index f2805d51bb..20af123d91 100644
--- a/notes.c
+++ b/notes.c
@@ -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;
}