Merge branch 'jk/unused-post-2.42' into next
Mark unused parameters to functions as such, and/or remove unused parameters, to bring us closer to -Wunused-parameter clean. * jk/unused-post-2.42: (22 commits) update-ref: mark unused parameter in parser callbacks gc: mark unused descriptors in scheduler callbacks bundle-uri: mark unused parameters in callbacks fetch: mark unused parameter in ref_transaction callback credential: mark unused parameter in urlmatch callback grep: mark unused parmaeters in pcre fallbacks imap-send: mark unused parameters with NO_OPENSSL worktree: mark unused parameters in noop repair callback negotiator/noop: mark unused callback parameters add-interactive: mark unused callback parameters grep: mark unused parameter in output function test-trace2: mark unused argv/argc parameters trace2: mark unused config callback parameter trace2: mark unused us_elapsed_absolute parameters stash: mark unused parameter in diff callback ls-tree: mark unused parameter in callback commit-graph: mark unused data parameters in generation callbacks worktree: mark unused parameters in each_ref_fn callback pack-bitmap: mark unused parameters in show_object callback ref-filter: mark unused parameters in parser callbacks ...
This commit is contained in:
@ -308,7 +308,7 @@ static void clear_item(struct refname_hash_entry *item)
|
||||
|
||||
|
||||
static void add_already_queued_tags(const char *refname,
|
||||
const struct object_id *old_oid,
|
||||
const struct object_id *old_oid UNUSED,
|
||||
const struct object_id *new_oid,
|
||||
void *cb_data)
|
||||
{
|
||||
|
@ -1934,7 +1934,7 @@ static int launchctl_add_plists(void)
|
||||
launchctl_schedule_plist(exec_path, SCHEDULE_WEEKLY);
|
||||
}
|
||||
|
||||
static int launchctl_update_schedule(int run_maintenance, int fd)
|
||||
static int launchctl_update_schedule(int run_maintenance, int fd UNUSED)
|
||||
{
|
||||
if (run_maintenance)
|
||||
return launchctl_add_plists();
|
||||
@ -2115,7 +2115,7 @@ static int schtasks_schedule_tasks(void)
|
||||
schtasks_schedule_task(exec_path, SCHEDULE_WEEKLY);
|
||||
}
|
||||
|
||||
static int schtasks_update_schedule(int run_maintenance, int fd)
|
||||
static int schtasks_update_schedule(int run_maintenance, int fd UNUSED)
|
||||
{
|
||||
if (run_maintenance)
|
||||
return schtasks_schedule_tasks();
|
||||
@ -2556,7 +2556,7 @@ static int systemd_timer_setup_units(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int systemd_timer_update_schedule(int run_maintenance, int fd)
|
||||
static int systemd_timer_update_schedule(int run_maintenance, int fd UNUSED)
|
||||
{
|
||||
if (run_maintenance)
|
||||
return systemd_timer_setup_units();
|
||||
|
@ -241,7 +241,8 @@ static int show_tree_long(const struct object_id *oid, struct strbuf *base,
|
||||
return recurse;
|
||||
}
|
||||
|
||||
static int show_tree_name_only(const struct object_id *oid, struct strbuf *base,
|
||||
static int show_tree_name_only(const struct object_id *oid UNUSED,
|
||||
struct strbuf *base,
|
||||
const char *pathname, unsigned mode,
|
||||
void *context)
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ static int is_path_a_directory(const char *path)
|
||||
}
|
||||
|
||||
static void add_diff_to_buf(struct diff_queue_struct *q,
|
||||
struct diff_options *options,
|
||||
struct diff_options *options UNUSED,
|
||||
void *data)
|
||||
{
|
||||
int i;
|
||||
|
@ -311,8 +311,8 @@ static void report_ok(const char *command)
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
static void parse_cmd_option(struct ref_transaction *transaction,
|
||||
const char *next, const char *end)
|
||||
static void parse_cmd_option(struct ref_transaction *transaction UNUSED,
|
||||
const char *next, const char *end UNUSED)
|
||||
{
|
||||
const char *rest;
|
||||
if (skip_prefix(next, "no-deref", &rest) && *rest == line_termination)
|
||||
@ -321,8 +321,8 @@ static void parse_cmd_option(struct ref_transaction *transaction,
|
||||
die("option unknown: %s", next);
|
||||
}
|
||||
|
||||
static void parse_cmd_start(struct ref_transaction *transaction,
|
||||
const char *next, const char *end)
|
||||
static void parse_cmd_start(struct ref_transaction *transaction UNUSED,
|
||||
const char *next, const char *end UNUSED)
|
||||
{
|
||||
if (*next != line_termination)
|
||||
die("start: extra input: %s", next);
|
||||
@ -330,7 +330,7 @@ static void parse_cmd_start(struct ref_transaction *transaction,
|
||||
}
|
||||
|
||||
static void parse_cmd_prepare(struct ref_transaction *transaction,
|
||||
const char *next, const char *end)
|
||||
const char *next, const char *end UNUSED)
|
||||
{
|
||||
struct strbuf error = STRBUF_INIT;
|
||||
if (*next != line_termination)
|
||||
@ -341,7 +341,7 @@ static void parse_cmd_prepare(struct ref_transaction *transaction,
|
||||
}
|
||||
|
||||
static void parse_cmd_abort(struct ref_transaction *transaction,
|
||||
const char *next, const char *end)
|
||||
const char *next, const char *end UNUSED)
|
||||
{
|
||||
struct strbuf error = STRBUF_INIT;
|
||||
if (*next != line_termination)
|
||||
@ -352,7 +352,7 @@ static void parse_cmd_abort(struct ref_transaction *transaction,
|
||||
}
|
||||
|
||||
static void parse_cmd_commit(struct ref_transaction *transaction,
|
||||
const char *next, const char *end)
|
||||
const char *next, const char *end UNUSED)
|
||||
{
|
||||
struct strbuf error = STRBUF_INIT;
|
||||
if (*next != line_termination)
|
||||
|
@ -628,10 +628,10 @@ static void print_preparing_worktree_line(int detach,
|
||||
*
|
||||
* Returns 0 on failure and non-zero on success.
|
||||
*/
|
||||
static int first_valid_ref(const char *refname,
|
||||
const struct object_id *oid,
|
||||
int flags,
|
||||
void *cb_data)
|
||||
static int first_valid_ref(const char *refname UNUSED,
|
||||
const struct object_id *oid UNUSED,
|
||||
int flags UNUSED,
|
||||
void *cb_data UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user