diff options
author | Jeff King <peff@peff.net> | 2022-08-19 13:08:37 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-19 22:18:55 +0300 |
commit | 7718827a2d4ec90c9cbdb7ec01f68065bdb52dc2 (patch) | |
tree | 9528cbdcffdc5575a292901604102211e886db0b /refs/packed-backend.c | |
parent | c006e9fa59c02261738e20890f1aecd78f9db707 (diff) |
refs: mark unused virtual method parameters
The refs code uses various polymorphic types (e.g., loose vs packed
ref_stores, abstracted iterators). Not every virtual function or
callback needs all of its parameters. Let's mark the unused ones to
quiet -Wunused-parameter.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/packed-backend.c')
-rw-r--r-- | refs/packed-backend.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 97b6837767..a45bb686f0 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -726,7 +726,7 @@ static struct snapshot *get_snapshot(struct packed_ref_store *refs) } static int packed_read_raw_ref(struct ref_store *ref_store, const char *refname, - struct object_id *oid, struct strbuf *referent, + struct object_id *oid, struct strbuf *UNUSED(referent), unsigned int *type, int *failure_errno) { struct packed_ref_store *refs = @@ -1078,7 +1078,8 @@ int packed_refs_is_locked(struct ref_store *ref_store) static const char PACKED_REFS_HEADER[] = "# pack-refs with: peeled fully-peeled sorted \n"; -static int packed_init_db(struct ref_store *ref_store, struct strbuf *err) +static int packed_init_db(struct ref_store *UNUSED(ref_store), + struct strbuf *UNUSED(err)) { /* Nothing to do. */ return 0; @@ -1473,7 +1474,7 @@ failure: static int packed_transaction_abort(struct ref_store *ref_store, struct ref_transaction *transaction, - struct strbuf *err) + struct strbuf *UNUSED(err)) { struct packed_ref_store *refs = packed_downcast( ref_store, @@ -1512,7 +1513,7 @@ cleanup: return ret; } -static int packed_initial_transaction_commit(struct ref_store *ref_store, +static int packed_initial_transaction_commit(struct ref_store *UNUSED(ref_store), struct ref_transaction *transaction, struct strbuf *err) { @@ -1568,7 +1569,8 @@ static int packed_delete_refs(struct ref_store *ref_store, const char *msg, return ret; } -static int packed_pack_refs(struct ref_store *ref_store, unsigned int flags) +static int packed_pack_refs(struct ref_store *UNUSED(ref_store), + unsigned int UNUSED(flags)) { /* * Packed refs are already packed. It might be that loose refs @@ -1578,7 +1580,7 @@ static int packed_pack_refs(struct ref_store *ref_store, unsigned int flags) return 0; } -static struct ref_iterator *packed_reflog_iterator_begin(struct ref_store *ref_store) +static struct ref_iterator *packed_reflog_iterator_begin(struct ref_store *UNUSED(ref_store)) { return empty_ref_iterator_begin(); } |