summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-02-24 06:39:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-02-24 17:13:32 (GMT)
commit1bff855419b0cb338e7ef53b77f99207704bf63e (patch)
tree6d1105473c1c61595785401ccbe7c5b53f5e4fe4 /pretty.c
parent43090008e365a5dfec5a167b5ab64b1f0c1345a6 (diff)
downloadgit-1bff855419b0cb338e7ef53b77f99207704bf63e.zip
git-1bff855419b0cb338e7ef53b77f99207704bf63e.tar.gz
git-1bff855419b0cb338e7ef53b77f99207704bf63e.tar.bz2
userformat_want_item(): mark unused parameter
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>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pretty.c b/pretty.c
index 1e1e218..2e47292 100644
--- 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;