add-interactive: mark unused callback parameters
The interactive commands are dispatched from a table of abstract pointers, but not every command uses every parameter it receives. Mark the unused ones to silence -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Aug 29, 2023 at 19:45 UTC
57dbb70cd953c39c9eb8a8d0fe42e5319194fb81
1 file changed
+4
-4
add-interactive.c
+4
-4
@@ -1021,9 +1021,9 @@ static int run_diff(struct add_i_state *s, const struct pathspec *ps,
1021
return res;
1022
}
1023
1024
-static int run_help(struct add_i_state *s, const struct pathspec *unused_ps,
1025
- struct prefix_item_list *unused_files,
1026
- struct list_and_choose_options *unused_opts)
1024
+static int run_help(struct add_i_state *s, const struct pathspec *ps UNUSED,
1025
+ struct prefix_item_list *files UNUSED,
1026
+ struct list_and_choose_options *opts UNUSED)
1027
{
1028
color_fprintf_ln(stdout, s->help_color, "status - %s",
1029
_("show paths with changes"));
@@ -1074,7 +1074,7 @@ struct print_command_item_data {
1074
const char *color, *reset;
1075
};
1076
1077
-static void print_command_item(int i, int selected,
1077
+static void print_command_item(int i, int selected UNUSED,
1078
struct string_list_item *item,
1079
void *print_command_item_data)
1080
{