userdiff: mark unused parameter in internal callback
Since f12fa9ee6c (userdiff: add and use for_each_userdiff_driver(), 2021-04-08), lookup of userdiffs is done with a generic for_each_userdiff_driver(). But the name lookup doesn't use the "type" field, of course. We can't get rid of that field from the generic interface because it is used by t/helper/test-userdiff.c. So mark it as unused in this instance to silence -Wunused-parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Dec 13, 2022 at 06:16 UTC
c25d9e529d531adf0697e0c09ba292227c835164
1 file changed
+2
-1
userdiff.c
+2
-1
@@ -315,7 +315,8 @@ struct find_by_namelen_data {
315
};
316
317
static int userdiff_find_by_namelen_cb(struct userdiff_driver *driver,
318
- enum userdiff_driver_type type, void *priv)
318
+ enum userdiff_driver_type type UNUSED,
319
+ void *priv)
320
{
321
struct find_by_namelen_data *cb_data = priv;
322