Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-09-14 22:56:38 +0300
committerJunio C Hamano <gitster@pobox.com>2022-09-14 22:56:39 +0300
commita6b42ec0c6e2ef492b0ed6d1f1123dc7e724154e (patch)
treeee3cd1f07f639913c04501f6562a7bbc9b4ad4b8 /builtin/remote.c
parente188ec3a735ae52a0d0d3c22f9df6b29fa613b1e (diff)
parent776515ef8b381d49caeccfe2e8da98cb666e257a (diff)
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
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 07117e4c9a..3bde8cc760 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;
@@ -955,7 +958,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;
@@ -1485,7 +1489,7 @@ static int prune(int argc, const char **argv, const char *prefix)
return result;
}
-static int get_remote_default(const char *key, const char *value, void *priv)
+static int get_remote_default(const char *key, const char *UNUSED(value), void *priv)
{
if (strcmp(key, "remotes.default") == 0) {
int *found = priv;