]> git.ipfire.org Git - thirdparty/git.git/commitdiff
userformat_want_item(): mark unused parameter
authorJeff King <peff@peff.net>
Fri, 24 Feb 2023 06:39:43 +0000 (01:39 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Feb 2023 17:13:32 +0000 (09:13 -0800)
This function is used as a callback to strbuf_expand(), so it must
conform to the correct interface. But naturally it doesn't need to touch
its "sb" parameter, since it is only examining the placeholder string,
and not actually writing any output. So mark the unused parameter to
silence -Wunused-parameter.

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

index 1e1e21878c833d54b165b0aa6d9720eb16536a94..2e47292407e9022dc4d9075347ea13b5672d8433 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -1857,7 +1857,8 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
        return consumed + 1;
 }
 
-static size_t userformat_want_item(struct strbuf *sb, const char *placeholder,
+static size_t userformat_want_item(struct strbuf *sb UNUSED,
+                                  const char *placeholder,
                                   void *context)
 {
        struct userformat_want *w = context;