Git fork

fsmonitor: mark unused parameters in stub functions

The fsmonitor code has some platform-specific functions for which one or
more platforms implement noop or stub functions. We can't get rid of
these functions nor change their interface, since the point is to match
their equivalents in other platforms. But let's annotate their
parameters to quiet the compiler's -Wunused-parameter warning.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Jeff King and committed by
Junio C Hamano
4cb5e0b3 caf433bb

+13 -12
+4 -4
compat/fsmonitor/fsm-health-darwin.c
··· 4 4 #include "fsm-health.h" 5 5 #include "fsmonitor--daemon.h" 6 6 7 - int fsm_health__ctor(struct fsmonitor_daemon_state *state) 7 + int fsm_health__ctor(struct fsmonitor_daemon_state *state UNUSED) 8 8 { 9 9 return 0; 10 10 } 11 11 12 - void fsm_health__dtor(struct fsmonitor_daemon_state *state) 12 + void fsm_health__dtor(struct fsmonitor_daemon_state *state UNUSED) 13 13 { 14 14 return; 15 15 } 16 16 17 - void fsm_health__loop(struct fsmonitor_daemon_state *state) 17 + void fsm_health__loop(struct fsmonitor_daemon_state *state UNUSED) 18 18 { 19 19 return; 20 20 } 21 21 22 - void fsm_health__stop_async(struct fsmonitor_daemon_state *state) 22 + void fsm_health__stop_async(struct fsmonitor_daemon_state *state UNUSED) 23 23 { 24 24 }
+4 -3
compat/fsmonitor/fsm-path-utils-win32.c
··· 132 132 /* 133 133 * No-op for now. 134 134 */ 135 - int fsmonitor__get_alias(const char *path, struct alias_info *info) 135 + int fsmonitor__get_alias(const char *path UNUSED, 136 + struct alias_info *info UNUSED) 136 137 { 137 138 return 0; 138 139 } ··· 140 141 /* 141 142 * No-op for now. 142 143 */ 143 - char *fsmonitor__resolve_alias(const char *path, 144 - const struct alias_info *info) 144 + char *fsmonitor__resolve_alias(const char *path UNUSED, 145 + const struct alias_info *info UNUSED) 145 146 { 146 147 return NULL; 147 148 }
+5 -5
fsmonitor-ipc.c
··· 20 20 return 0; 21 21 } 22 22 23 - const char *fsmonitor_ipc__get_path(struct repository *r) 23 + const char *fsmonitor_ipc__get_path(struct repository *r UNUSED) 24 24 { 25 25 return NULL; 26 26 } ··· 30 30 return IPC_STATE__OTHER_ERROR; 31 31 } 32 32 33 - int fsmonitor_ipc__send_query(const char *since_token, 34 - struct strbuf *answer) 33 + int fsmonitor_ipc__send_query(const char *since_token UNUSED, 34 + struct strbuf *answer UNUSED) 35 35 { 36 36 return -1; 37 37 } 38 38 39 - int fsmonitor_ipc__send_command(const char *command, 40 - struct strbuf *answer) 39 + int fsmonitor_ipc__send_command(const char *command UNUSED, 40 + struct strbuf *answer UNUSED) 41 41 { 42 42 return -1; 43 43 }