ll-merge: mark unused parameters in callbacks
commit4b992f0a24ad884eb43898cbb468fdf8fbe647bb
authorJeff King <peff@peff.net>
Tue, 18 Oct 2022 01:10:24 +0000 (17 21:10 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Oct 2022 04:24:04 +0000 (17 21:24 -0700)
tree12f807cf803fbac2f88b0a9484635ccccbee2620
parent0ada4b9bfeb42409f4bea1beef006fbd854aa108
ll-merge: mark unused parameters in callbacks

We have a generic ll_merge_fn, but not every implementation needs every
parameter. In particular, neither binary nor ext merges care about names
(since they do not generate conflict markers), and most do not need to
look at the ll_merge_driver itself.

Ironically, neither ll_xdl_merge() nor ll_union_merge() needs to have
their driver parameter annotated (even though both are named
drv_unused!).  This is because they may fall back to calling
ll_binary_merge() directly. And even though that function won't look at
it, we still pass it along, and hence it is "used" in the caller.

We could get away with passing NULL, but that's likely more confusing
and brittle than just passing along our own driver. And we have to keep
the driver parameter in all callbacks, since ll_ext_merge() uses it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ll-merge.c