diff --git a/cfg.c b/cfg.c index 5f314b7b..05588336 100644 --- a/cfg.c +++ b/cfg.c @@ -35,11 +35,13 @@ void printflike2 cfg_error(struct cmd_ctx *, const char *, ...); char *cfg_cause; +/* ARGSUSED */ void printflike2 cfg_print(unused struct cmd_ctx *ctx, unused const char *fmt, ...) { } +/* ARGSUSED */ void printflike2 cfg_error(unused struct cmd_ctx *ctx, const char *fmt, ...) { diff --git a/client.c b/client.c index 6f054732..91c2f6c5 100644 --- a/client.c +++ b/client.c @@ -222,6 +222,7 @@ out: exit(client_exitval); } +/* ARGSUSED */ void client_signal(int sig, unused short events, unused void *data) { @@ -250,6 +251,7 @@ client_signal(int sig, unused short events, unused void *data) client_update_event(); } +/* ARGSUSED */ void client_callback(unused int fd, short events, unused void *data) { diff --git a/cmd-copy-buffer.c b/cmd-copy-buffer.c index 3a6a441e..5f407e0c 100644 --- a/cmd-copy-buffer.c +++ b/cmd-copy-buffer.c @@ -51,6 +51,7 @@ const struct cmd_entry cmd_copy_buffer_entry = { cmd_copy_buffer_print }; +/* ARGSUSED */ void cmd_copy_buffer_init(struct cmd *self, unused int arg) { diff --git a/cmd-generic.c b/cmd-generic.c index 5232bc98..9961c19f 100644 --- a/cmd-generic.c +++ b/cmd-generic.c @@ -148,6 +148,7 @@ cmd_fill_argument(int flags, char **arg, char **arg2, int argc, char **argv) return (0); } +/* ARGSUSED */ void cmd_target_init(struct cmd *self, unused int key) { @@ -231,6 +232,7 @@ cmd_target_print(struct cmd *self, char *buf, size_t len) return (off); } +/* ARGSUSED */ void cmd_srcdst_init(struct cmd *self, unused int key) { @@ -322,6 +324,7 @@ cmd_srcdst_print(struct cmd *self, char *buf, size_t len) return (off); } +/* ARGSUSED */ void cmd_buffer_init(struct cmd *self, unused int key) { diff --git a/cmd-kill-server.c b/cmd-kill-server.c index cf206770..9e6ddb21 100644 --- a/cmd-kill-server.c +++ b/cmd-kill-server.c @@ -40,6 +40,7 @@ const struct cmd_entry cmd_kill_server_entry = { NULL }; +/* ARGSUSED */ int cmd_kill_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx) { diff --git a/cmd-list-clients.c b/cmd-list-clients.c index 4b7bc7b7..9c941b45 100644 --- a/cmd-list-clients.c +++ b/cmd-list-clients.c @@ -40,6 +40,7 @@ const struct cmd_entry cmd_list_clients_entry = { NULL }; +/* ARGSUSED */ int cmd_list_clients_exec(unused struct cmd *self, struct cmd_ctx *ctx) { diff --git a/cmd-list-commands.c b/cmd-list-commands.c index 9b669b67..a5c98ea7 100644 --- a/cmd-list-commands.c +++ b/cmd-list-commands.c @@ -37,6 +37,7 @@ const struct cmd_entry cmd_list_commands_entry = { NULL }; +/* ARGSUSED */ int cmd_list_commands_exec(unused struct cmd *self, struct cmd_ctx *ctx) { diff --git a/cmd-list-sessions.c b/cmd-list-sessions.c index d0210552..774c599b 100644 --- a/cmd-list-sessions.c +++ b/cmd-list-sessions.c @@ -39,6 +39,7 @@ const struct cmd_entry cmd_list_sessions_entry = { NULL }; +/* ARGSUSED */ int cmd_list_sessions_exec(unused struct cmd *self, struct cmd_ctx *ctx) { diff --git a/cmd-lock-server.c b/cmd-lock-server.c index 1d8f80e4..b588e2b2 100644 --- a/cmd-lock-server.c +++ b/cmd-lock-server.c @@ -41,6 +41,7 @@ const struct cmd_entry cmd_lock_server_entry = { NULL, }; +/* ARGSUSED */ int cmd_lock_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx) { diff --git a/cmd-new-session.c b/cmd-new-session.c index 8103392d..25a054bc 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -52,6 +52,7 @@ const struct cmd_entry cmd_new_session_entry = { cmd_new_session_print }; +/* ARGSUSED */ void cmd_new_session_init(struct cmd *self, unused int arg) { diff --git a/cmd-new-window.c b/cmd-new-window.c index e251c8cb..4cba8883 100644 --- a/cmd-new-window.c +++ b/cmd-new-window.c @@ -51,6 +51,7 @@ const struct cmd_entry cmd_new_window_entry = { cmd_new_window_print }; +/* ARGSUSED */ void cmd_new_window_init(struct cmd *self, unused int arg) { diff --git a/cmd-pipe-pane.c b/cmd-pipe-pane.c index 135d3837..a88d7ea8 100644 --- a/cmd-pipe-pane.c +++ b/cmd-pipe-pane.c @@ -129,6 +129,7 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmd_ctx *ctx) } } +/* ARGSUSED */ void cmd_pipe_pane_error_callback( unused struct bufferevent *bufev, unused short what, void *data) diff --git a/cmd-server-info.c b/cmd-server-info.c index 03cd2e95..f0728608 100644 --- a/cmd-server-info.c +++ b/cmd-server-info.c @@ -44,6 +44,7 @@ const struct cmd_entry cmd_server_info_entry = { NULL }; +/* ARGSUSED */ int cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) { diff --git a/cmd-source-file.c b/cmd-source-file.c index a53a1cb8..f9ca9993 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -45,6 +45,7 @@ const struct cmd_entry cmd_source_file_entry = { cmd_source_file_print }; +/* ARGSUSED */ void cmd_source_file_init(struct cmd *self, unused int arg) { diff --git a/cmd-start-server.c b/cmd-start-server.c index 382ae48d..b93c9e6c 100644 --- a/cmd-start-server.c +++ b/cmd-start-server.c @@ -37,6 +37,7 @@ const struct cmd_entry cmd_start_server_entry = { NULL }; +/* ARGSUSED */ int cmd_start_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx) { diff --git a/job.c b/job.c index d779057d..ba8f33f0 100644 --- a/job.c +++ b/job.c @@ -192,6 +192,7 @@ job_run(struct job *job) } /* Job buffer error callback. */ +/* ARGSUSED */ void job_callback(unused struct bufferevent *bufev, unused short events, void *data) { diff --git a/names.c b/names.c index d9335ac5..a468b59b 100644 --- a/names.c +++ b/names.c @@ -41,6 +41,7 @@ queue_window_name(struct window *w) evtimer_add(&w->name_timer, &tv); } +/* ARGSUSED */ void window_name_callback(unused int fd, unused short events, void *data) { diff --git a/screen-write.c b/screen-write.c index 8afffa4b..93c239a6 100644 --- a/screen-write.c +++ b/screen-write.c @@ -40,6 +40,7 @@ screen_write_start( } /* Finish writing. */ +/* ARGSUSED */ void screen_write_stop(unused struct screen_write_ctx *ctx) { diff --git a/server-client.c b/server-client.c index e6560931..e0fcfd04 100644 --- a/server-client.c +++ b/server-client.c @@ -427,6 +427,7 @@ server_client_reset_state(struct client *c) } /* Repeat time callback. */ +/* ARGSUSED */ void server_client_repeat_timer(unused int fd, unused short events, void *data) { diff --git a/server-fn.c b/server-fn.c index ae1340e7..90cf9ae1 100644 --- a/server-fn.c +++ b/server-fn.c @@ -396,6 +396,7 @@ server_clear_identify(struct client *c) } } +/* ARGSUSED */ void server_callback_identify(unused int fd, unused short events, void *data) { diff --git a/server.c b/server.c index afb5f6e9..b3979596 100644 --- a/server.c +++ b/server.c @@ -314,6 +314,7 @@ server_update_socket(void) } /* Callback for server socket. */ +/* ARGSUSED */ void server_accept_callback(int fd, short events, unused void *data) { @@ -389,6 +390,7 @@ server_signal_clear(void) } /* Signal handler. */ +/* ARGSUSED */ void server_signal_callback(int sig, unused short events, unused void *data) { @@ -486,6 +488,7 @@ server_child_stopped(pid_t pid, int status) } /* Handle once-per-second timer events. */ +/* ARGSUSED */ void server_second_callback(unused int fd, unused short events, unused void *arg) { diff --git a/session.c b/session.c index db2eb779..116969be 100644 --- a/session.c +++ b/session.c @@ -319,7 +319,7 @@ session_next_activity(struct session *s, struct winlink *wl) break; if (session_alert_has(s, wl, WINDOW_CONTENT)) break; - wl = winlink_next(&s->windows, wl); + wl = winlink_next(wl); } return (wl); } @@ -333,7 +333,7 @@ session_next(struct session *s, int activity) if (s->curw == NULL) return (-1); - wl = winlink_next(&s->windows, s->curw); + wl = winlink_next(s->curw); if (activity) wl = session_next_activity(s, wl); if (wl == NULL) { @@ -360,7 +360,7 @@ session_previous_activity(struct session *s, struct winlink *wl) break; if (session_alert_has(s, wl, WINDOW_CONTENT)) break; - wl = winlink_previous(&s->windows, wl); + wl = winlink_previous(wl); } return (wl); } @@ -374,7 +374,7 @@ session_previous(struct session *s, int activity) if (s->curw == NULL) return (-1); - wl = winlink_previous(&s->windows, s->curw); + wl = winlink_previous(s->curw); if (activity) wl = session_previous_activity(s, wl); if (wl == NULL) { diff --git a/status.c b/status.c index 4236d54b..3ab7a90e 100644 --- a/status.c +++ b/status.c @@ -688,6 +688,7 @@ status_message_clear(struct client *c) } /* Clear status line message after timer expires. */ +/* ARGSUSED */ void status_message_callback(unused int fd, unused short event, void *data) { diff --git a/tmux.c b/tmux.c index f339b729..1a77c832 100644 --- a/tmux.c +++ b/tmux.c @@ -554,6 +554,7 @@ main_clear_signals(void) event_del(&main_ev_sigterm); } +/* ARGSUSED */ void main_signal(int sig, unused short events, unused void *data) { @@ -563,6 +564,7 @@ main_signal(int sig, unused short events, unused void *data) } } +/* ARGSUSED */ void main_callback(unused int fd, short events, void *data) { diff --git a/tmux.h b/tmux.h index 61921ae2..90943516 100644 --- a/tmux.h +++ b/tmux.h @@ -1790,8 +1790,8 @@ int winlink_next_index(struct winlinks *, int); u_int winlink_count(struct winlinks *); struct winlink *winlink_add(struct winlinks *, struct window *, int); void winlink_remove(struct winlinks *, struct winlink *); -struct winlink *winlink_next(struct winlinks *, struct winlink *); -struct winlink *winlink_previous(struct winlinks *, struct winlink *); +struct winlink *winlink_next(struct winlink *); +struct winlink *winlink_previous(struct winlink *); void winlink_stack_push(struct winlink_stack *, struct winlink *); void winlink_stack_remove(struct winlink_stack *, struct winlink *); int window_index(struct window *, u_int *); diff --git a/tty-keys.c b/tty-keys.c index d44583c4..a64c29b0 100644 --- a/tty-keys.c +++ b/tty-keys.c @@ -555,6 +555,7 @@ handle_key: } /* Key timer callback. */ +/* ARGSUSED */ void tty_keys_callback(unused int fd, unused short events, void *data) { diff --git a/tty.c b/tty.c index 84931e78..999c3919 100644 --- a/tty.c +++ b/tty.c @@ -38,7 +38,7 @@ int tty_try_88(struct tty *, u_char, const char *); void tty_colours(struct tty *, const struct grid_cell *, int *); void tty_colours_fg(struct tty *, const struct grid_cell *, int *); -void tty_colours_bg(struct tty *, const struct grid_cell *, int *); +void tty_colours_bg(struct tty *, const struct grid_cell *); void tty_redraw_region(struct tty *, const struct tty_ctx *); void tty_emulate_repeat( @@ -125,6 +125,7 @@ tty_open(struct tty *tty, const char *overrides, char **cause) return (0); } +/* ARGSUSED */ void tty_read_callback(unused struct bufferevent *bufev, void *data) { @@ -134,6 +135,7 @@ tty_read_callback(unused struct bufferevent *bufev, void *data) ; } +/* ARGSUSED */ void tty_error_callback( unused struct bufferevent *bufev, unused short what, unused void *data) @@ -1278,7 +1280,7 @@ tty_colours(struct tty *tty, const struct grid_cell *gc, int *attr) */ if (!bg_default && (bg != tc->bg || ((flags & GRID_FLAG_BG256) != (tc->flags & GRID_FLAG_BG256)))) - tty_colours_bg(tty, gc, attr); + tty_colours_bg(tty, gc); } void @@ -1315,7 +1317,7 @@ save_fg: } void -tty_colours_bg(struct tty *tty, const struct grid_cell *gc, unused int *attr) +tty_colours_bg(struct tty *tty, const struct grid_cell *gc) { struct grid_cell *tc = &tty->cell; u_char bg = gc->bg; diff --git a/window-choose.c b/window-choose.c index a0f66b81..fc012d9e 100644 --- a/window-choose.c +++ b/window-choose.c @@ -169,6 +169,7 @@ window_choose_resize(struct window_pane *wp, u_int sx, u_int sy) window_choose_redraw_screen(wp); } +/* ARGSUSED */ void window_choose_key(struct window_pane *wp, unused struct client *c, int key) { @@ -275,6 +276,7 @@ window_choose_key(struct window_pane *wp, unused struct client *c, int key) } } +/* ARGSUSED */ void window_choose_mouse( struct window_pane *wp, unused struct client *c, struct mouse_event *m) diff --git a/window-clock.c b/window-clock.c index 49239180..d45d6cdd 100644 --- a/window-clock.c +++ b/window-clock.c @@ -82,6 +82,7 @@ window_clock_resize(struct window_pane *wp, u_int sx, u_int sy) window_clock_draw_screen(wp); } +/* ARGSUSED */ void window_clock_key( struct window_pane *wp, unused struct client *c, unused int key) diff --git a/window-copy.c b/window-copy.c index dba57256..ec1d8e4a 100644 --- a/window-copy.c +++ b/window-copy.c @@ -435,6 +435,7 @@ window_copy_key_input(struct window_pane *wp, int key) return (0); } +/* ARGSUSED */ void window_copy_mouse( struct window_pane *wp, unused struct client *c, struct mouse_event *m) diff --git a/window-more.c b/window-more.c index 94a08f1e..ec705795 100644 --- a/window-more.c +++ b/window-more.c @@ -123,6 +123,7 @@ window_more_resize(struct window_pane *wp, u_int sx, u_int sy) window_more_redraw_screen(wp); } +/* ARGSUSED */ void window_more_key(struct window_pane *wp, unused struct client *c, int key) { diff --git a/window.c b/window.c index be61e73c..3b7702fd 100644 --- a/window.c +++ b/window.c @@ -161,13 +161,13 @@ winlink_remove(struct winlinks *wwl, struct winlink *wl) } struct winlink * -winlink_next(unused struct winlinks *wwl, struct winlink *wl) +winlink_next(struct winlink *wl) { return (RB_NEXT(winlinks, wwl, wl)); } struct winlink * -winlink_previous(unused struct winlinks *wwl, struct winlink *wl) +winlink_previous(struct winlink *wl) { return (RB_PREV(winlinks, wwl, wl)); } @@ -582,6 +582,7 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell, return (0); } +/* ARGSUSED */ void window_pane_read_callback(unused struct bufferevent *bufev, void *data) { @@ -590,6 +591,7 @@ window_pane_read_callback(unused struct bufferevent *bufev, void *data) window_pane_parse(wp); } +/* ARGSUSED */ void window_pane_error_callback( unused struct bufferevent *bufev, unused short what, void *data)