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
This commit is contained in:
Junio C Hamano
2022-09-14 12:56:38 -07:00
92 changed files with 337 additions and 234 deletions

View File

@ -301,7 +301,7 @@ struct refname_hash_entry {
char refname[FLEX_ARRAY];
};
static int refname_hash_entry_cmp(const void *hashmap_cmp_fn_data,
static int refname_hash_entry_cmp(const void *UNUSED(hashmap_cmp_fn_data),
const struct hashmap_entry *eptr,
const struct hashmap_entry *entry_or_key,
const void *keydata)
@ -329,7 +329,7 @@ static struct refname_hash_entry *refname_hash_add(struct hashmap *map,
static int add_one_refname(const char *refname,
const struct object_id *oid,
int flag, void *cbdata)
int UNUSED(flag), void *cbdata)
{
struct hashmap *refname_map = cbdata;
@ -1464,8 +1464,9 @@ static void set_option(struct transport *transport, const char *name, const char
}
static int add_oid(const char *refname, const struct object_id *oid, int flags,
void *cb_data)
static int add_oid(const char *UNUSED(refname),
const struct object_id *oid,
int UNUSED(flags), void *cb_data)
{
struct oid_array *oids = cb_data;