When parsing the input, we have a "keep_cr" parameter to tell us how to handle line endings. But this doesn't apply to stgit or hg patches (which are not mailbox formats where we have to worry about that), so we ignore the parameter entirely in those functions. Let's mark these as unused so that -Wunused-parameter does not complain about them. Note that we could just drop these parameters entirely. They are necessary to conform to the mail_conv_fn interface used by split_mail_conv(), but these two callbacks are the only ones used with that function. The other formats (which _do_ care about keep_cr) use split_mail_mbox(). But it's conceivable that we'd eventually add another format that does care about this option, so let's leave it as part of the generic interface. Signed-off-by: Jeff King <peff@xxxxxxxx> --- builtin/am.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index a78daa6971..8451f5e423 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -787,7 +787,7 @@ static int split_mail_conv(mail_conv_fn fn, struct am_state *state, * A split_mail_conv() callback that converts an StGit patch to an RFC2822 * message suitable for parsing with git-mailinfo. */ -static int stgit_patch_to_mail(FILE *out, FILE *in, int keep_cr) +static int stgit_patch_to_mail(FILE *out, FILE *in, int keep_cr UNUSED) { struct strbuf sb = STRBUF_INIT; int subject_printed = 0; @@ -870,7 +870,7 @@ static int split_mail_stgit_series(struct am_state *state, const char **paths, * A split_patches_conv() callback that converts a mercurial patch to a RFC2822 * message suitable for parsing with git-mailinfo. */ -static int hg_patch_to_mail(FILE *out, FILE *in, int keep_cr) +static int hg_patch_to_mail(FILE *out, FILE *in, int keep_cr UNUSED) { struct strbuf sb = STRBUF_INIT; int rc = 0; -- 2.41.0.586.g3c0cc15bc7