run-command: mark error routine parameters as unused
commitce41759ed5edac9d30a73640b4fdd155c9f9fee0
authorJeff King <peff@peff.net>
Fri, 24 Feb 2023 06:39:18 +0000 (24 01:39 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Feb 2023 17:13:30 +0000 (24 09:13 -0800)
treeec361a4c2b11565e72e4f103d2a4734282619968
parentd3dcfa047f415de5590b60781dcdf11492e25d41
run-command: mark error routine parameters as unused

After forking but before exec-ing a command, we install special
error/warn/die handlers in the child. These ignore the error messages
they get, since the idea is that they shouldn't be called in the first
place.

Arguably they could pass along that error message _in addition_ to
saying "error() should not be called in a child", but since the whole
point is to avoid any conflicts on stdio/malloc locks, etc, we're better
to just keep these simple. Seeing them trigger is effectively a bug, and
the developer is probably better off grabbing a stack trace.

But we do want to mark the functions so that -Wunused-parameter doesn't
complain.

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