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:
13
submodule.c
13
submodule.c
@ -213,7 +213,8 @@ void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt,
|
||||
}
|
||||
|
||||
/* Cheap function that only determines if we're interested in submodules at all */
|
||||
int git_default_submodule_config(const char *var, const char *value, void *cb)
|
||||
int git_default_submodule_config(const char *var, const char *value,
|
||||
void *UNUSED(cb))
|
||||
{
|
||||
if (!strcmp(var, "submodule.recurse")) {
|
||||
int v = git_config_bool(var, value) ?
|
||||
@ -938,8 +939,9 @@ static void free_submodules_data(struct string_list *submodules)
|
||||
string_list_clear(submodules, 1);
|
||||
}
|
||||
|
||||
static int has_remote(const char *refname, const struct object_id *oid,
|
||||
int flags, void *cb_data)
|
||||
static int has_remote(const char *UNUSED(refname),
|
||||
const struct object_id *UNUSED(oid),
|
||||
int UNUSED(flags), void *UNUSED(cb_data))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@ -1241,8 +1243,9 @@ int push_unpushed_submodules(struct repository *r,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int append_oid_to_array(const char *ref, const struct object_id *oid,
|
||||
int flags, void *data)
|
||||
static int append_oid_to_array(const char *UNUSED(ref),
|
||||
const struct object_id *oid,
|
||||
int UNUSED(flags), void *data)
|
||||
{
|
||||
struct oid_array *array = data;
|
||||
oid_array_append(array, oid);
|
||||
|
||||
Reference in New Issue
Block a user