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:
Junio C Hamano
2023-08-30 13:52:02 -07:00
21 changed files with 110 additions and 84 deletions

View File

@ -1021,9 +1021,9 @@ static int run_diff(struct add_i_state *s, const struct pathspec *ps,
return res; return res;
} }
static int run_help(struct add_i_state *s, const struct pathspec *unused_ps, static int run_help(struct add_i_state *s, const struct pathspec *ps UNUSED,
struct prefix_item_list *unused_files, struct prefix_item_list *files UNUSED,
struct list_and_choose_options *unused_opts) struct list_and_choose_options *opts UNUSED)
{ {
color_fprintf_ln(stdout, s->help_color, "status - %s", color_fprintf_ln(stdout, s->help_color, "status - %s",
_("show paths with changes")); _("show paths with changes"));
@ -1074,7 +1074,7 @@ struct print_command_item_data {
const char *color, *reset; const char *color, *reset;
}; };
static void print_command_item(int i, int selected, static void print_command_item(int i, int selected UNUSED,
struct string_list_item *item, struct string_list_item *item,
void *print_command_item_data) void *print_command_item_data)
{ {

View File

@ -308,7 +308,7 @@ static void clear_item(struct refname_hash_entry *item)
static void add_already_queued_tags(const char *refname, 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, const struct object_id *new_oid,
void *cb_data) void *cb_data)
{ {

View File

@ -1934,7 +1934,7 @@ static int launchctl_add_plists(void)
launchctl_schedule_plist(exec_path, SCHEDULE_WEEKLY); 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) if (run_maintenance)
return launchctl_add_plists(); return launchctl_add_plists();
@ -2115,7 +2115,7 @@ static int schtasks_schedule_tasks(void)
schtasks_schedule_task(exec_path, SCHEDULE_WEEKLY); 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) if (run_maintenance)
return schtasks_schedule_tasks(); return schtasks_schedule_tasks();
@ -2556,7 +2556,7 @@ static int systemd_timer_setup_units(void)
return ret; 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) if (run_maintenance)
return systemd_timer_setup_units(); return systemd_timer_setup_units();

View File

@ -241,7 +241,8 @@ static int show_tree_long(const struct object_id *oid, struct strbuf *base,
return recurse; 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, const char *pathname, unsigned mode,
void *context) void *context)
{ {

View File

@ -362,7 +362,7 @@ static int is_path_a_directory(const char *path)
} }
static void add_diff_to_buf(struct diff_queue_struct *q, static void add_diff_to_buf(struct diff_queue_struct *q,
struct diff_options *options, struct diff_options *options UNUSED,
void *data) void *data)
{ {
int i; int i;

View File

@ -311,8 +311,8 @@ static void report_ok(const char *command)
fflush(stdout); fflush(stdout);
} }
static void parse_cmd_option(struct ref_transaction *transaction, static void parse_cmd_option(struct ref_transaction *transaction UNUSED,
const char *next, const char *end) const char *next, const char *end UNUSED)
{ {
const char *rest; const char *rest;
if (skip_prefix(next, "no-deref", &rest) && *rest == line_termination) 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); die("option unknown: %s", next);
} }
static void parse_cmd_start(struct ref_transaction *transaction, static void parse_cmd_start(struct ref_transaction *transaction UNUSED,
const char *next, const char *end) const char *next, const char *end UNUSED)
{ {
if (*next != line_termination) if (*next != line_termination)
die("start: extra input: %s", next); 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, 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; struct strbuf error = STRBUF_INIT;
if (*next != line_termination) 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, 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; struct strbuf error = STRBUF_INIT;
if (*next != line_termination) 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, 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; struct strbuf error = STRBUF_INIT;
if (*next != line_termination) if (*next != line_termination)

View File

@ -628,10 +628,10 @@ static void print_preparing_worktree_line(int detach,
* *
* Returns 0 on failure and non-zero on success. * Returns 0 on failure and non-zero on success.
*/ */
static int first_valid_ref(const char *refname, static int first_valid_ref(const char *refname UNUSED,
const struct object_id *oid, const struct object_id *oid UNUSED,
int flags, int flags UNUSED,
void *cb_data) void *cb_data UNUSED)
{ {
return 1; return 1;
} }

View File

@ -20,7 +20,7 @@ static struct {
{ BUNDLE_HEURISTIC_CREATIONTOKEN, "creationToken" }, { BUNDLE_HEURISTIC_CREATIONTOKEN, "creationToken" },
}; };
static int compare_bundles(const void *hashmap_cmp_fn_data, static int compare_bundles(const void *hashmap_cmp_fn_data UNUSED,
const struct hashmap_entry *he1, const struct hashmap_entry *he1,
const struct hashmap_entry *he2, const struct hashmap_entry *he2,
const void *id) const void *id)
@ -45,7 +45,7 @@ void init_bundle_list(struct bundle_list *list)
} }
static int clear_remote_bundle_info(struct remote_bundle_info *bundle, static int clear_remote_bundle_info(struct remote_bundle_info *bundle,
void *data) void *data UNUSED)
{ {
FREE_AND_NULL(bundle->id); FREE_AND_NULL(bundle->id);
FREE_AND_NULL(bundle->uri); FREE_AND_NULL(bundle->uri);
@ -779,7 +779,7 @@ static int unbundle_all_bundles(struct repository *r,
return 0; return 0;
} }
static int unlink_bundle(struct remote_bundle_info *info, void *data) static int unlink_bundle(struct remote_bundle_info *info, void *data UNUSED)
{ {
if (info->file) if (info->file)
unlink_or_warn(info->file); unlink_or_warn(info->file);

View File

@ -1578,12 +1578,14 @@ static void compute_topological_levels(struct write_commit_graph_context *ctx)
stop_progress(&ctx->progress); stop_progress(&ctx->progress);
} }
static timestamp_t get_generation_from_graph_data(struct commit *c, void *data) static timestamp_t get_generation_from_graph_data(struct commit *c,
void *data UNUSED)
{ {
return commit_graph_data_at(c)->generation; return commit_graph_data_at(c)->generation;
} }
static void set_generation_v2(struct commit *c, timestamp_t t, void *data) static void set_generation_v2(struct commit *c, timestamp_t t,
void *data UNUSED)
{ {
struct commit_graph_data *g = commit_graph_data_at(c); struct commit_graph_data *g = commit_graph_data_at(c);
g->generation = t; g->generation = t;
@ -1597,7 +1599,6 @@ static void compute_generation_numbers(struct write_commit_graph_context *ctx)
.commits = &ctx->commits, .commits = &ctx->commits,
.get_generation = get_generation_from_graph_data, .get_generation = get_generation_from_graph_data,
.set_generation = set_generation_v2, .set_generation = set_generation_v2,
.data = ctx,
}; };
if (ctx->report_progress) if (ctx->report_progress)
@ -1626,7 +1627,7 @@ static void compute_generation_numbers(struct write_commit_graph_context *ctx)
} }
static void set_generation_in_graph_data(struct commit *c, timestamp_t t, static void set_generation_in_graph_data(struct commit *c, timestamp_t t,
void *data) void *data UNUSED)
{ {
commit_graph_data_at(c)->generation = t; commit_graph_data_at(c)->generation = t;
} }

View File

@ -88,8 +88,8 @@ static int proto_is_http(const char *s)
static void credential_describe(struct credential *c, struct strbuf *out); static void credential_describe(struct credential *c, struct strbuf *out);
static void credential_format(struct credential *c, struct strbuf *out); static void credential_format(struct credential *c, struct strbuf *out);
static int select_all(const struct urlmatch_item *a, static int select_all(const struct urlmatch_item *a UNUSED,
const struct urlmatch_item *b) const struct urlmatch_item *b UNUSED)
{ {
return 0; return 0;
} }

12
grep.c
View File

@ -17,7 +17,7 @@ static int grep_source_load(struct grep_source *gs);
static int grep_source_is_binary(struct grep_source *gs, static int grep_source_is_binary(struct grep_source *gs,
struct index_state *istate); struct index_state *istate);
static void std_output(struct grep_opt *opt, const void *buf, size_t size) static void std_output(struct grep_opt *opt UNUSED, const void *buf, size_t size)
{ {
fwrite(buf, size, 1, stdout); fwrite(buf, size, 1, stdout);
} }
@ -452,18 +452,20 @@ static void free_pcre2_pattern(struct grep_pat *p)
pcre2_general_context_free(p->pcre2_general_context); pcre2_general_context_free(p->pcre2_general_context);
} }
#else /* !USE_LIBPCRE2 */ #else /* !USE_LIBPCRE2 */
static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt) static void compile_pcre2_pattern(struct grep_pat *p UNUSED,
const struct grep_opt *opt UNUSED)
{ {
die("cannot use Perl-compatible regexes when not compiled with USE_LIBPCRE"); die("cannot use Perl-compatible regexes when not compiled with USE_LIBPCRE");
} }
static int pcre2match(struct grep_pat *p, const char *line, const char *eol, static int pcre2match(struct grep_pat *p UNUSED, const char *line UNUSED,
regmatch_t *match, int eflags) const char *eol UNUSED, regmatch_t *match UNUSED,
int eflags UNUSED)
{ {
return 1; return 1;
} }
static void free_pcre2_pattern(struct grep_pat *p) static void free_pcre2_pattern(struct grep_pat *p UNUSED)
{ {
} }

View File

@ -206,10 +206,14 @@ static void socket_perror(const char *func, struct imap_socket *sock, int ret)
else else
fprintf(stderr, "%s: unexpected EOF\n", func); fprintf(stderr, "%s: unexpected EOF\n", func);
} }
/* mark as used to appease -Wunused-parameter with NO_OPENSSL */
(void)sock;
} }
#ifdef NO_OPENSSL #ifdef NO_OPENSSL
static int ssl_socket_connect(struct imap_socket *sock, int use_tls_only, int verify) static int ssl_socket_connect(struct imap_socket *sock UNUSED,
int use_tls_only UNUSED,
int verify UNUSED)
{ {
fprintf(stderr, "SSL requested but SSL support not compiled in\n"); fprintf(stderr, "SSL requested but SSL support not compiled in\n");
return -1; return -1;
@ -904,7 +908,9 @@ static char *cram(const char *challenge_64, const char *user, const char *pass)
#else #else
static char *cram(const char *challenge_64, const char *user, const char *pass) static char *cram(const char *challenge_64 UNUSED,
const char *user UNUSED,
const char *pass UNUSED)
{ {
die("If you want to use CRAM-MD5 authenticate method, " die("If you want to use CRAM-MD5 authenticate method, "
"you have to build git-imap-send with OpenSSL library."); "you have to build git-imap-send with OpenSSL library.");

View File

@ -3,22 +3,24 @@
#include "../commit.h" #include "../commit.h"
#include "../fetch-negotiator.h" #include "../fetch-negotiator.h"
static void known_common(struct fetch_negotiator *n, struct commit *c) static void known_common(struct fetch_negotiator *n UNUSED,
struct commit *c UNUSED)
{ {
/* do nothing */ /* do nothing */
} }
static void add_tip(struct fetch_negotiator *n, struct commit *c) static void add_tip(struct fetch_negotiator *n UNUSED,
struct commit *c UNUSED)
{ {
/* do nothing */ /* do nothing */
} }
static const struct object_id *next(struct fetch_negotiator *n) static const struct object_id *next(struct fetch_negotiator *n UNUSED)
{ {
return NULL; return NULL;
} }
static int ack(struct fetch_negotiator *n, struct commit *c) static int ack(struct fetch_negotiator *n UNUSED, struct commit *c UNUSED)
{ {
/* /*
* This negotiator does not emit any commits, so there is no commit to * This negotiator does not emit any commits, so there is no commit to
@ -28,7 +30,7 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
return 0; return 0;
} }
static void release(struct fetch_negotiator *n) static void release(struct fetch_negotiator *n UNUSED)
{ {
/* nothing to release */ /* nothing to release */
} }

View File

@ -1101,8 +1101,9 @@ static void show_boundary_commit(struct commit *commit, void *_data)
} }
} }
static void show_boundary_object(struct object *object, static void show_boundary_object(struct object *object UNUSED,
const char *name, void *data) const char *name UNUSED,
void *data UNUSED)
{ {
BUG("should not be called"); BUG("should not be called");
} }

View File

@ -549,7 +549,8 @@ static int signature_atom_parser(struct ref_format *format UNUSED,
return 0; return 0;
} }
static int trailers_atom_parser(struct ref_format *format, struct used_atom *atom, static int trailers_atom_parser(struct ref_format *format UNUSED,
struct used_atom *atom,
const char *arg, struct strbuf *err) const char *arg, struct strbuf *err)
{ {
atom->u.contents.trailer_opts.no_divider = 1; atom->u.contents.trailer_opts.no_divider = 1;
@ -819,7 +820,7 @@ static int if_atom_parser(struct ref_format *format UNUSED,
return 0; return 0;
} }
static int rest_atom_parser(struct ref_format *format, static int rest_atom_parser(struct ref_format *format UNUSED,
struct used_atom *atom UNUSED, struct used_atom *atom UNUSED,
const char *arg, struct strbuf *err) const char *arg, struct strbuf *err)
{ {
@ -828,7 +829,8 @@ static int rest_atom_parser(struct ref_format *format,
return 0; return 0;
} }
static int ahead_behind_atom_parser(struct ref_format *format, struct used_atom *atom, static int ahead_behind_atom_parser(struct ref_format *format,
struct used_atom *atom UNUSED,
const char *arg, struct strbuf *err) const char *arg, struct strbuf *err)
{ {
struct string_list_item *item; struct string_list_item *item;

View File

@ -433,10 +433,9 @@ struct commit_message {
const char *message; const char *message;
}; };
static const char *short_commit_name(struct commit *commit) static const char *short_commit_name(struct repository *r, struct commit *commit)
{ {
return repo_find_unique_abbrev(the_repository, &commit->object.oid, return repo_find_unique_abbrev(r, &commit->object.oid, DEFAULT_ABBREV);
DEFAULT_ABBREV);
} }
static int get_message(struct commit *commit, struct commit_message *out) static int get_message(struct commit *commit, struct commit_message *out)
@ -446,7 +445,7 @@ static int get_message(struct commit *commit, struct commit_message *out)
out->message = repo_logmsg_reencode(the_repository, commit, NULL, out->message = repo_logmsg_reencode(the_repository, commit, NULL,
get_commit_output_encoding()); get_commit_output_encoding());
abbrev = short_commit_name(commit); abbrev = short_commit_name(the_repository, commit);
subject_len = find_commit_subject(out->message, &subject); subject_len = find_commit_subject(out->message, &subject);
@ -2383,7 +2382,7 @@ static int do_pick_commit(struct repository *r,
error(command == TODO_REVERT error(command == TODO_REVERT
? _("could not revert %s... %s") ? _("could not revert %s... %s")
: _("could not apply %s... %s"), : _("could not apply %s... %s"),
short_commit_name(commit), msg.subject); short_commit_name(r, commit), msg.subject);
print_advice(r, res == 1, opts); print_advice(r, res == 1, opts);
repo_rerere(r, opts->allow_rerere_auto); repo_rerere(r, opts->allow_rerere_auto);
goto leave; goto leave;
@ -2650,7 +2649,7 @@ static int parse_insn_line(struct repository *r, struct todo_item *item,
return item->commit ? 0 : -1; return item->commit ? 0 : -1;
} }
int sequencer_get_last_command(struct repository *r, enum replay_action *action) int sequencer_get_last_command(struct repository *r UNUSED, enum replay_action *action)
{ {
const char *todo_file, *bol; const char *todo_file, *bol;
struct strbuf buf = STRBUF_INIT; struct strbuf buf = STRBUF_INIT;
@ -3172,7 +3171,8 @@ static int walk_revs_populate_todo(struct todo_list *todo_list,
item->offset_in_buf = todo_list->buf.len; item->offset_in_buf = todo_list->buf.len;
subject_len = find_commit_subject(commit_buffer, &subject); subject_len = find_commit_subject(commit_buffer, &subject);
strbuf_addf(&todo_list->buf, "%s %s %.*s\n", command_string, strbuf_addf(&todo_list->buf, "%s %s %.*s\n", command_string,
short_commit_name(commit), subject_len, subject); short_commit_name(the_repository, commit),
subject_len, subject);
repo_unuse_commit_buffer(the_repository, commit, repo_unuse_commit_buffer(the_repository, commit,
commit_buffer); commit_buffer);
} }
@ -3593,7 +3593,7 @@ static int error_with_patch(struct repository *r,
} else if (exit_code) { } else if (exit_code) {
if (commit) if (commit)
fprintf_ln(stderr, _("Could not apply %s... %.*s"), fprintf_ln(stderr, _("Could not apply %s... %.*s"),
short_commit_name(commit), subject_len, subject); short_commit_name(r, commit), subject_len, subject);
else else
/* /*
* We don't have the hash of the parent so * We don't have the hash of the parent so
@ -4728,7 +4728,7 @@ static int pick_commits(struct repository *r,
term_clear_line(); term_clear_line();
fprintf(stderr, fprintf(stderr,
_("Stopped at %s... %.*s\n"), _("Stopped at %s... %.*s\n"),
short_commit_name(commit), short_commit_name(r, commit),
item->arg_len, arg); item->arg_len, arg);
} }
return error_with_patch(r, commit, return error_with_patch(r, commit,
@ -5564,7 +5564,7 @@ static int make_script_with_merges(struct pretty_print_context *pp,
if (!is_empty && (commit->object.flags & PATCHSAME)) { if (!is_empty && (commit->object.flags & PATCHSAME)) {
if (flags & TODO_LIST_WARN_SKIPPED_CHERRY_PICKS) if (flags & TODO_LIST_WARN_SKIPPED_CHERRY_PICKS)
warning(_("skipped previously applied commit %s"), warning(_("skipped previously applied commit %s"),
short_commit_name(commit)); short_commit_name(the_repository, commit));
skipped_commit = 1; skipped_commit = 1;
continue; continue;
} }
@ -5800,7 +5800,7 @@ int sequencer_make_script(struct repository *r, struct strbuf *out, int argc,
if (!is_empty && (commit->object.flags & PATCHSAME)) { if (!is_empty && (commit->object.flags & PATCHSAME)) {
if (flags & TODO_LIST_WARN_SKIPPED_CHERRY_PICKS) if (flags & TODO_LIST_WARN_SKIPPED_CHERRY_PICKS)
warning(_("skipped previously applied commit %s"), warning(_("skipped previously applied commit %s"),
short_commit_name(commit)); short_commit_name(r, commit));
skipped_commit = 1; skipped_commit = 1;
continue; continue;
} }
@ -5892,7 +5892,8 @@ static void todo_list_add_exec_commands(struct todo_list *todo_list,
todo_list->alloc = alloc; todo_list->alloc = alloc;
} }
static void todo_list_to_strbuf(struct repository *r, struct todo_list *todo_list, static void todo_list_to_strbuf(struct repository *r,
struct todo_list *todo_list,
struct strbuf *buf, int num, unsigned flags) struct strbuf *buf, int num, unsigned flags)
{ {
struct todo_item *item; struct todo_item *item;
@ -5921,7 +5922,7 @@ static void todo_list_to_strbuf(struct repository *r, struct todo_list *todo_lis
/* add commit id */ /* add commit id */
if (item->commit) { if (item->commit) {
const char *oid = flags & TODO_LIST_SHORTEN_IDS ? const char *oid = flags & TODO_LIST_SHORTEN_IDS ?
short_commit_name(item->commit) : short_commit_name(r, item->commit) :
oid_to_hex(&item->commit->object.oid); oid_to_hex(&item->commit->object.oid);
if (item->command == TODO_FIXUP) { if (item->command == TODO_FIXUP) {

View File

@ -45,7 +45,7 @@ static int get_i(int *p_value, const char *data)
* [] "def_param" events for all of the "interesting" pre-defined * [] "def_param" events for all of the "interesting" pre-defined
* config settings. * config settings.
*/ */
static int ut_001return(int argc, const char **argv) static int ut_001return(int argc UNUSED, const char **argv)
{ {
int rc; int rc;
@ -65,7 +65,7 @@ static int ut_001return(int argc, const char **argv)
* [] "def_param" events for all of the "interesting" pre-defined * [] "def_param" events for all of the "interesting" pre-defined
* config settings. * config settings.
*/ */
static int ut_002exit(int argc, const char **argv) static int ut_002exit(int argc UNUSED, const char **argv)
{ {
int rc; int rc;
@ -201,7 +201,7 @@ static int ut_006data(int argc, const char **argv)
return 0; return 0;
} }
static int ut_007BUG(int argc, const char **argv) static int ut_007BUG(int argc UNUSED, const char **argv UNUSED)
{ {
/* /*
* Exercise BUG() to ensure that the message is printed to trace2. * Exercise BUG() to ensure that the message is printed to trace2.

View File

@ -58,7 +58,8 @@ static struct tr2_sysenv_entry tr2_sysenv_settings[] = {
/* clang-format on */ /* clang-format on */
static int tr2_sysenv_cb(const char *key, const char *value, static int tr2_sysenv_cb(const char *key, const char *value,
const struct config_context *ctx UNUSED, void *d) const struct config_context *ctx UNUSED,
void *d UNUSED)
{ {
int k; int k;

View File

@ -335,7 +335,7 @@ static void fn_alias_fl(const char *file, int line, const char *alias,
} }
static void fn_child_start_fl(const char *file, int line, static void fn_child_start_fl(const char *file, int line,
uint64_t us_elapsed_absolute, uint64_t us_elapsed_absolute UNUSED,
const struct child_process *cmd) const struct child_process *cmd)
{ {
const char *event_name = "child_start"; const char *event_name = "child_start";
@ -367,7 +367,8 @@ static void fn_child_start_fl(const char *file, int line,
} }
static void fn_child_exit_fl(const char *file, int line, static void fn_child_exit_fl(const char *file, int line,
uint64_t us_elapsed_absolute, int cid, int pid, uint64_t us_elapsed_absolute UNUSED,
int cid, int pid,
int code, uint64_t us_elapsed_child) int code, uint64_t us_elapsed_child)
{ {
const char *event_name = "child_exit"; const char *event_name = "child_exit";
@ -388,7 +389,8 @@ static void fn_child_exit_fl(const char *file, int line,
} }
static void fn_child_ready_fl(const char *file, int line, static void fn_child_ready_fl(const char *file, int line,
uint64_t us_elapsed_absolute, int cid, int pid, uint64_t us_elapsed_absolute UNUSED,
int cid, int pid,
const char *ready, uint64_t us_elapsed_child) const char *ready, uint64_t us_elapsed_child)
{ {
const char *event_name = "child_ready"; const char *event_name = "child_ready";
@ -409,7 +411,7 @@ static void fn_child_ready_fl(const char *file, int line,
} }
static void fn_thread_start_fl(const char *file, int line, static void fn_thread_start_fl(const char *file, int line,
uint64_t us_elapsed_absolute) uint64_t us_elapsed_absolute UNUSED)
{ {
const char *event_name = "thread_start"; const char *event_name = "thread_start";
struct json_writer jw = JSON_WRITER_INIT; struct json_writer jw = JSON_WRITER_INIT;
@ -423,7 +425,7 @@ static void fn_thread_start_fl(const char *file, int line,
} }
static void fn_thread_exit_fl(const char *file, int line, static void fn_thread_exit_fl(const char *file, int line,
uint64_t us_elapsed_absolute, uint64_t us_elapsed_absolute UNUSED,
uint64_t us_elapsed_thread) uint64_t us_elapsed_thread)
{ {
const char *event_name = "thread_exit"; const char *event_name = "thread_exit";
@ -439,7 +441,8 @@ static void fn_thread_exit_fl(const char *file, int line,
jw_release(&jw); jw_release(&jw);
} }
static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute, static void fn_exec_fl(const char *file, int line,
uint64_t us_elapsed_absolute UNUSED,
int exec_id, const char *exe, const char **argv) int exec_id, const char *exe, const char **argv)
{ {
const char *event_name = "exec"; const char *event_name = "exec";
@ -460,8 +463,8 @@ static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
} }
static void fn_exec_result_fl(const char *file, int line, static void fn_exec_result_fl(const char *file, int line,
uint64_t us_elapsed_absolute, int exec_id, uint64_t us_elapsed_absolute UNUSED,
int code) int exec_id, int code)
{ {
const char *event_name = "exec_result"; const char *event_name = "exec_result";
struct json_writer jw = JSON_WRITER_INIT; struct json_writer jw = JSON_WRITER_INIT;
@ -511,7 +514,7 @@ static void fn_repo_fl(const char *file, int line,
} }
static void fn_region_enter_printf_va_fl(const char *file, int line, static void fn_region_enter_printf_va_fl(const char *file, int line,
uint64_t us_elapsed_absolute, uint64_t us_elapsed_absolute UNUSED,
const char *category, const char *category,
const char *label, const char *label,
const struct repository *repo, const struct repository *repo,
@ -538,7 +541,7 @@ static void fn_region_enter_printf_va_fl(const char *file, int line,
} }
static void fn_region_leave_printf_va_fl( static void fn_region_leave_printf_va_fl(
const char *file, int line, uint64_t us_elapsed_absolute, const char *file, int line, uint64_t us_elapsed_absolute UNUSED,
uint64_t us_elapsed_region, const char *category, const char *label, uint64_t us_elapsed_region, const char *category, const char *label,
const struct repository *repo, const char *fmt, va_list ap) const struct repository *repo, const char *fmt, va_list ap)
{ {

View File

@ -86,7 +86,7 @@ static void fn_version_fl(const char *file, int line)
} }
static void fn_start_fl(const char *file, int line, static void fn_start_fl(const char *file, int line,
uint64_t us_elapsed_absolute, const char **argv) uint64_t us_elapsed_absolute UNUSED, const char **argv)
{ {
struct strbuf buf_payload = STRBUF_INIT; struct strbuf buf_payload = STRBUF_INIT;
@ -215,7 +215,7 @@ static void fn_alias_fl(const char *file, int line, const char *alias,
} }
static void fn_child_start_fl(const char *file, int line, static void fn_child_start_fl(const char *file, int line,
uint64_t us_elapsed_absolute, uint64_t us_elapsed_absolute UNUSED,
const struct child_process *cmd) const struct child_process *cmd)
{ {
struct strbuf buf_payload = STRBUF_INIT; struct strbuf buf_payload = STRBUF_INIT;
@ -243,7 +243,8 @@ static void fn_child_start_fl(const char *file, int line,
} }
static void fn_child_exit_fl(const char *file, int line, static void fn_child_exit_fl(const char *file, int line,
uint64_t us_elapsed_absolute, int cid, int pid, uint64_t us_elapsed_absolute UNUSED,
int cid, int pid,
int code, uint64_t us_elapsed_child) int code, uint64_t us_elapsed_child)
{ {
struct strbuf buf_payload = STRBUF_INIT; struct strbuf buf_payload = STRBUF_INIT;
@ -256,7 +257,8 @@ static void fn_child_exit_fl(const char *file, int line,
} }
static void fn_child_ready_fl(const char *file, int line, static void fn_child_ready_fl(const char *file, int line,
uint64_t us_elapsed_absolute, int cid, int pid, uint64_t us_elapsed_absolute UNUSED,
int cid, int pid,
const char *ready, uint64_t us_elapsed_child) const char *ready, uint64_t us_elapsed_child)
{ {
struct strbuf buf_payload = STRBUF_INIT; struct strbuf buf_payload = STRBUF_INIT;
@ -268,7 +270,8 @@ static void fn_child_ready_fl(const char *file, int line,
strbuf_release(&buf_payload); strbuf_release(&buf_payload);
} }
static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute, static void fn_exec_fl(const char *file, int line,
uint64_t us_elapsed_absolute UNUSED,
int exec_id, const char *exe, const char **argv) int exec_id, const char *exe, const char **argv)
{ {
struct strbuf buf_payload = STRBUF_INIT; struct strbuf buf_payload = STRBUF_INIT;
@ -284,8 +287,8 @@ static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
} }
static void fn_exec_result_fl(const char *file, int line, static void fn_exec_result_fl(const char *file, int line,
uint64_t us_elapsed_absolute, int exec_id, uint64_t us_elapsed_absolute UNUSED,
int code) int exec_id, int code)
{ {
struct strbuf buf_payload = STRBUF_INIT; struct strbuf buf_payload = STRBUF_INIT;
@ -321,7 +324,8 @@ static void fn_repo_fl(const char *file, int line,
} }
static void fn_printf_va_fl(const char *file, int line, static void fn_printf_va_fl(const char *file, int line,
uint64_t us_elapsed_absolute, const char *fmt, uint64_t us_elapsed_absolute UNUSED,
const char *fmt,
va_list ap) va_list ap)
{ {
struct strbuf buf_payload = STRBUF_INIT; struct strbuf buf_payload = STRBUF_INIT;

View File

@ -581,8 +581,10 @@ static void repair_gitfile(struct worktree *wt,
strbuf_release(&dotgit); strbuf_release(&dotgit);
} }
static void repair_noop(int iserr, const char *path, const char *msg, static void repair_noop(int iserr UNUSED,
void *cb_data) const char *path UNUSED,
const char *msg UNUSED,
void *cb_data UNUSED)
{ {
/* nothing */ /* nothing */
} }