diff options
author | Jeff King <peff@peff.net> | 2022-12-13 12:13:48 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-12-13 14:16:23 +0100 |
commit | 61bdc7c5d8b1dedc5f9c3af45c5738d14136ae90 (patch) | |
tree | e6abfd77ea8438e5f37e76f46b54b4a0bbfb1458 /range-diff.c | |
parent | xdiff: mark unused parameter in xdl_call_hunk_func() (diff) | |
download | git-61bdc7c5d8b1dedc5f9c3af45c5738d14136ae90.tar.xz git-61bdc7c5d8b1dedc5f9c3af45c5738d14136ae90.zip |
diff: mark unused parameters in callbacks
The diff code provides a format_callback interface, but not every
callback needs each parameter (e.g., the "opt" and "data" parameters are
frequently left unused). Likewise for the output_prefix callback, the
low-level change/add_remove interfaces, the callbacks used by
xdi_diff(), etc.
Mark unused arguments in the callback implementations to quiet
-Wunused-parameter.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'range-diff.c')
-rw-r--r-- | range-diff.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/range-diff.c b/range-diff.c index 8b7d81adc1..8255ab4349 100644 --- a/range-diff.c +++ b/range-diff.c @@ -269,14 +269,18 @@ static void find_exact_matches(struct string_list *a, struct string_list *b) hashmap_clear(&map); } -static int diffsize_consume(void *data, char *line, unsigned long len) +static int diffsize_consume(void *data, + char *line UNUSED, + unsigned long len UNUSED) { (*(int *)data)++; return 0; } -static void diffsize_hunk(void *data, long ob, long on, long nb, long nn, - const char *funcline, long funclen) +static void diffsize_hunk(void *data, + long ob UNUSED, long on UNUSED, + long nb UNUSED, long nn UNUSED, + const char *func UNUSED, long funclen UNUSED) { diffsize_consume(data, NULL, 0); } @@ -461,7 +465,7 @@ static void patch_diff(const char *a, const char *b, diff_flush(diffopt); } -static struct strbuf *output_prefix_cb(struct diff_options *opt, void *data) +static struct strbuf *output_prefix_cb(struct diff_options *opt UNUSED, void *data) { return data; } |