From 61bdc7c5d8b1dedc5f9c3af45c5738d14136ae90 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 13 Dec 2022 06:13:48 -0500 Subject: 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 Signed-off-by: Junio C Hamano --- diff-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diff-lib.c') diff --git a/diff-lib.c b/diff-lib.c index 2edea41a23..dec040c366 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -673,7 +673,7 @@ int index_differs_from(struct repository *r, return (has_changes != 0); } -static struct strbuf *idiff_prefix_cb(struct diff_options *opt, void *data) +static struct strbuf *idiff_prefix_cb(struct diff_options *opt UNUSED, void *data) { return data; } -- cgit v1.2.3