]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fsmonitor: mark unused hashmap callback parameters
authorJeff King <peff@peff.net>
Mon, 18 Sep 2023 22:33:14 +0000 (18:33 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Sep 2023 22:56:15 +0000 (15:56 -0700)
Like many hashmap comparison functions, our cookies_cmp() does not look
at its extra void data parameter. This should have been annotated in
02c3c59e62 (hashmap: mark unused callback parameters, 2022-08-19), but
this new case was added around the same time (plus fsmonitor is not
built at all on Linux, so it is easy to miss there).

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

index 7c4130c9811bd526748651f284aa1330dff30abe..ce511c3ed6490b71528a4d45252f68dc8413a3f9 100644 (file)
@@ -129,8 +129,9 @@ struct fsmonitor_cookie_item {
        enum fsmonitor_cookie_item_result result;
 };
 
-static int cookies_cmp(const void *data, const struct hashmap_entry *he1,
-                    const struct hashmap_entry *he2, const void *keydata)
+static int cookies_cmp(const void *data UNUSED,
+                      const struct hashmap_entry *he1,
+                      const struct hashmap_entry *he2, const void *keydata)
 {
        const struct fsmonitor_cookie_item *a =
                container_of(he1, const struct fsmonitor_cookie_item, entry);