[PATCH 19/21] userformat_want_item(): mark unused parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 pretty.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pretty.c b/pretty.c
index 1e1e21878c..2e47292407 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;
-- 
2.39.2.981.g6157336f25




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux