From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 14/14] t/helper: mark unused callback void data parameters
Date: Mon, 3 Jul 2023 02:44:36 -0400 [thread overview]
Message-ID: <20230703064436.GN3537614@coredump.intra.peff.net> (raw)
In-Reply-To: <20230703064347.GA3524892@coredump.intra.peff.net>
Many callback interfaces have an extra void data parameter, but we don't
always need it (especially for dumping functions like the ones in test
helpers). Mark them as unused to avoid -Wunused-parameter warnings.
Signed-off-by: Jeff King <peff@peff.net>
---
t/helper/test-dump-split-index.c | 2 +-
t/helper/test-oid-array.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/helper/test-dump-split-index.c b/t/helper/test-dump-split-index.c
index 5cf0b26dca..f29d18ef94 100644
--- a/t/helper/test-dump-split-index.c
+++ b/t/helper/test-dump-split-index.c
@@ -7,7 +7,7 @@
#include "split-index.h"
#include "ewah/ewok.h"
-static void show_bit(size_t pos, void *data)
+static void show_bit(size_t pos, void *data UNUSED)
{
printf(" %d", (int)pos);
}
diff --git a/t/helper/test-oid-array.c b/t/helper/test-oid-array.c
index eef68833b7..aafe398ef0 100644
--- a/t/helper/test-oid-array.c
+++ b/t/helper/test-oid-array.c
@@ -4,7 +4,7 @@
#include "setup.h"
#include "strbuf.h"
-static int print_oid(const struct object_id *oid, void *data)
+static int print_oid(const struct object_id *oid, void *data UNUSED)
{
puts(oid_to_hex(oid));
return 0;
--
2.41.0.586.g3c0cc15bc7
prev parent reply other threads:[~2023-07-03 6:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 6:43 [PATCH 0/14] more -Wunused-parameter annotations Jeff King
2023-07-03 6:43 ` [PATCH 01/14] test-ref-store: drop unimplemented reflog-expire command Jeff King
2023-07-03 6:44 ` [PATCH 02/14] do_for_each_ref_helper(): mark unused repository parameter Jeff King
2023-07-03 6:44 ` [PATCH 03/14] http: mark unused parameters in curl callbacks Jeff King
2023-07-03 6:44 ` [PATCH 04/14] http-push: mark unused parameter in xml callback Jeff King
2023-07-03 6:44 ` [PATCH 05/14] am: mark unused keep_cr parameters Jeff King
2023-07-03 6:44 ` [PATCH 06/14] count-objects: mark unused parameter in alternates callback Jeff King
2023-07-03 6:44 ` [PATCH 07/14] revisions: drop unused "opt" parameter in "tweak" callbacks Jeff King
2023-07-03 6:44 ` [PATCH 08/14] fsck: mark unused parameters in various fsck callbacks Jeff King
2023-07-03 6:44 ` [PATCH 09/14] merge-tree: mark unused parameter in traverse callback Jeff King
2023-07-03 6:44 ` [PATCH 10/14] replace: mark unused parameter in ref callback Jeff King
2023-07-03 6:44 ` [PATCH 11/14] replace: mark unused parameter in each_mergetag_fn callback Jeff King
2023-07-03 6:44 ` [PATCH 12/14] rev-parse: mark unused parameter in for_each_abbrev callback Jeff King
2023-07-03 6:44 ` [PATCH 13/14] tag: mark unused parameters in each_tag_name_fn callbacks Jeff King
2023-07-03 6:44 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230703064436.GN3537614@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).