aboutsummaryrefslogtreecommitdiffstats
path: root/refs/files-backend.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-09-14 12:56:38 -0700
committerJunio C Hamano <gitster@pobox.com>2022-09-14 12:56:39 -0700
commita6b42ec0c6e2ef492b0ed6d1f1123dc7e724154e (patch)
treeee3cd1f07f639913c04501f6562a7bbc9b4ad4b8 /refs/files-backend.c
parente188ec3a735ae52a0d0d3c22f9df6b29fa613b1e (diff)
parent776515ef8b381d49caeccfe2e8da98cb666e257a (diff)
downloadgit-a6b42ec0c6e2ef492b0ed6d1f1123dc7e724154e.tar.gz
Merge branch 'jk/unused-annotation'
Annotate function parameters that are not used (but cannot be removed for structural reasons), to prepare us to later compile with -Wunused warning turned on. * jk/unused-annotation: is_path_owned_by_current_uid(): mark "report" parameter as unused run-command: mark unused async callback parameters mark unused read_tree_recursive() callback parameters hashmap: mark unused callback parameters config: mark unused callback parameters streaming: mark unused virtual method parameters transport: mark bundle transport_options as unused refs: mark unused virtual method parameters refs: mark unused reflog callback parameters refs: mark unused each_ref_fn parameters git-compat-util: add UNUSED macro
Diffstat (limited to 'refs/files-backend.c')
-rw-r--r--refs/files-backend.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 8db7882aac..13bfdb7701 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2202,8 +2202,8 @@ static int files_reflog_iterator_advance(struct ref_iterator *ref_iterator)
return ok;
}
-static int files_reflog_iterator_peel(struct ref_iterator *ref_iterator,
- struct object_id *peeled)
+static int files_reflog_iterator_peel(struct ref_iterator *UNUSED(ref_iterator),
+ struct object_id *UNUSED(peeled))
{
BUG("ref_iterator_peel() called for reflog_iterator");
}
@@ -2257,7 +2257,7 @@ static struct ref_iterator *reflog_iterator_begin(struct ref_store *ref_store,
static enum iterator_selection reflog_iterator_select(
struct ref_iterator *iter_worktree,
struct ref_iterator *iter_common,
- void *cb_data)
+ void *UNUSED(cb_data))
{
if (iter_worktree) {
/*
@@ -2985,7 +2985,7 @@ cleanup:
static int files_transaction_abort(struct ref_store *ref_store,
struct ref_transaction *transaction,
- struct strbuf *err)
+ struct strbuf *UNUSED(err))
{
struct files_ref_store *refs =
files_downcast(ref_store, 0, "ref_transaction_abort");
@@ -2995,7 +2995,9 @@ static int files_transaction_abort(struct ref_store *ref_store,
}
static int ref_present(const char *refname,
- const struct object_id *oid, int flags, void *cb_data)
+ const struct object_id *UNUSED(oid),
+ int UNUSED(flags),
+ void *cb_data)
{
struct string_list *affected_refnames = cb_data;
@@ -3259,7 +3261,7 @@ static int files_reflog_expire(struct ref_store *ref_store,
return -1;
}
-static int files_init_db(struct ref_store *ref_store, struct strbuf *err)
+static int files_init_db(struct ref_store *ref_store, struct strbuf *UNUSED(err))
{
struct files_ref_store *refs =
files_downcast(ref_store, REF_STORE_WRITE, "init_db");