]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fsmonitor/darwin: mark unused parameters in system callback
authorJeff King <peff@peff.net>
Mon, 18 Sep 2023 22:32:56 +0000 (18:32 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Sep 2023 22:56:15 +0000 (15:56 -0700)
We pass fsevent_callback() to the system FSEventStreamCreate() function
as a callback. So we must match the expected function signature, even
though we don't care about all of the parameters. Mark the unused ones
to satisfy -Wunused-parameter.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/fsmonitor/fsm-listen-darwin.c

index 36c7e13281c675cba46d7a219f31f238f361c17c..11b56d3ef12ffb52ef291e95e2b8e39823e77f0f 100644 (file)
@@ -191,12 +191,12 @@ static void my_add_path(struct fsmonitor_batch *batch, const char *path)
 }
 
 
-static void fsevent_callback(ConstFSEventStreamRef streamRef,
+static void fsevent_callback(ConstFSEventStreamRef streamRef UNUSED,
                             void *ctx,
                             size_t num_of_events,
                             void *event_paths,
                             const FSEventStreamEventFlags event_flags[],
-                            const FSEventStreamEventId event_ids[])
+                            const FSEventStreamEventId event_ids[] UNUSED)
 {
        struct fsmonitor_daemon_state *state = ctx;
        struct fsm_listen_data *data = state->listen_data;