aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-09-14 12:56:39 -0700
committerJunio C Hamano <gitster@pobox.com>2022-09-14 12:56:39 -0700
commitdd407f1c7c7cce148d7313537494d0bc049ccb0e (patch)
tree960438c348acf300fca1f9e795b647df2d6f8e18 /builtin/remote.c
parenta6b42ec0c6e2ef492b0ed6d1f1123dc7e724154e (diff)
parent9ff7eb8c8882c477919acfe28a3d68bb58adf2ea (diff)
downloadgit-dd407f1c7c7cce148d7313537494d0bc049ccb0e.tar.gz
Merge branch 'ab/unused-annotation'
Undoes 'jk/unused-annotation' topic and redoes it to work around Coccinelle rules misfiring false positives in unrelated codepaths. * ab/unused-annotation: git-compat-util.h: use "deprecated" for UNUSED variables git-compat-util.h: use "UNUSED", not "UNUSED(var)"
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 3bde8cc760..985b845a18 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -265,7 +265,7 @@ 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 *UNUSED(data))
+ void *data UNUSED)
{
const char *orig_key = key;
char *name;
@@ -539,8 +539,8 @@ struct branches_for_remote {
};
static int add_branch_for_removal(const char *refname,
- const struct object_id *UNUSED(oid),
- int UNUSED(flags), void *cb_data)
+ const struct object_id *oid UNUSED,
+ int flags UNUSED, void *cb_data)
{
struct branches_for_remote *branches = cb_data;
struct refspec_item refspec;
@@ -582,8 +582,8 @@ struct rename_info {
};
static int read_remote_branches(const char *refname,
- const struct object_id *UNUSED(oid),
- int UNUSED(flags), void *cb_data)
+ const struct object_id *oid UNUSED,
+ int flags UNUSED, void *cb_data)
{
struct rename_info *rename = cb_data;
struct strbuf buf = STRBUF_INIT;
@@ -958,7 +958,7 @@ static void free_remote_ref_states(struct ref_states *states)
}
static int append_ref_to_tracked_list(const char *refname,
- const struct object_id *UNUSED(oid),
+ const struct object_id *oid UNUSED,
int flags, void *cb_data)
{
struct ref_states *states = cb_data;
@@ -1489,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 *UNUSED(value), void *priv)
+static int get_remote_default(const char *key, const char *value UNUSED, void *priv)
{
if (strcmp(key, "remotes.default") == 0) {
int *found = priv;