diff options
| author | Jeff King <peff@peff.net> | 2022-08-19 06:08:32 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-08-19 12:18:54 -0700 |
| commit | 63e14ee2d69b58eae72e34df81f2cde145427037 (patch) | |
| tree | fb936eb4980e58b3618a5535f3cd60f5e98bfc56 /builtin/remote.c | |
| parent | git-compat-util: add UNUSED macro (diff) | |
| download | git-63e14ee2d69b58eae72e34df81f2cde145427037.tar.gz git-63e14ee2d69b58eae72e34df81f2cde145427037.zip | |
refs: mark unused each_ref_fn parameters
Functions used with for_each_ref(), etc, need to conform to the
each_ref_fn interface. But most of them don't need every parameter;
let's annotate 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 'builtin/remote.c')
| -rw-r--r-- | builtin/remote.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/builtin/remote.c b/builtin/remote.c index c713463d89..b390360f07 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -264,7 +264,8 @@ static const char *abbrev_ref(const char *name, const char *prefix) } #define abbrev_branch(name) abbrev_ref((name), "refs/heads/") -static int config_read_branches(const char *key, const char *value, void *cb) +static int config_read_branches(const char *key, const char *value, + void *UNUSED(data)) { const char *orig_key = key; char *name; @@ -538,7 +539,8 @@ struct branches_for_remote { }; static int add_branch_for_removal(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 branches_for_remote *branches = cb_data; struct refspec_item refspec; @@ -580,7 +582,8 @@ struct rename_info { }; static int read_remote_branches(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 rename_info *rename = cb_data; struct strbuf buf = STRBUF_INIT; @@ -953,7 +956,8 @@ static void free_remote_ref_states(struct ref_states *states) } static int append_ref_to_tracked_list(const char *refname, - const struct object_id *oid, int flags, void *cb_data) + const struct object_id *UNUSED(oid), + int flags, void *cb_data) { struct ref_states *states = cb_data; struct refspec_item refspec; |
