mirror of
https://github.com/git/git.git
synced 2026-01-10 10:13:33 +00:00
reftable/basics: introduce REFTABLE_UNUSED annotation
Introduce the `REFTABLE_UNUSED` annotation and replace all existing users of `UNUSED` in the reftable library to use the new macro instead. Note that we unconditionally define `MAYBE_UNUSED` in the exact same way, so doing so unconditionally for `REFTABLE_UNUSED` should be fine, too. Suggested-by: Toon Claes <toon@iotcl.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
f8ed12dec4
commit
f93b2a0424
@@ -25,17 +25,17 @@ int iterator_next(struct reftable_iterator *it, struct reftable_record *rec)
|
||||
return it->ops->next(it->iter_arg, rec);
|
||||
}
|
||||
|
||||
static int empty_iterator_seek(void *arg UNUSED, struct reftable_record *want UNUSED)
|
||||
static int empty_iterator_seek(void *arg REFTABLE_UNUSED, struct reftable_record *want REFTABLE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int empty_iterator_next(void *arg UNUSED, struct reftable_record *rec UNUSED)
|
||||
static int empty_iterator_next(void *arg REFTABLE_UNUSED, struct reftable_record *rec REFTABLE_UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void empty_iterator_close(void *arg UNUSED)
|
||||
static void empty_iterator_close(void *arg REFTABLE_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -143,8 +143,8 @@ static int indexed_table_ref_iter_next_block(struct indexed_table_ref_iter *it)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int indexed_table_ref_iter_seek(void *p UNUSED,
|
||||
struct reftable_record *want UNUSED)
|
||||
static int indexed_table_ref_iter_seek(void *p REFTABLE_UNUSED,
|
||||
struct reftable_record *want REFTABLE_UNUSED)
|
||||
{
|
||||
return REFTABLE_API_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user