Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-07-03 09:44:11 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-14 03:23:59 +0300
commita8a8e75e9ef57a545f72adf8ffc579533c62e5df (patch)
tree5caba50df61d8c2f48dc001c70a571b3d22c2af2 /builtin/am.c
parente519ac35af2f976323f23e83e47bfd03d920754f (diff)
am: mark unused keep_cr parameters
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@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 5fab159599..cee6d28af6 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;