mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-07 16:54:01 +01:00
Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.
This commit is contained in:
parent
621dabd44e
commit
4ca857e0e9
2
cfg.c
2
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, ...)
|
||||
{
|
||||
|
2
client.c
2
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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
1
job.c
1
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)
|
||||
{
|
||||
|
1
names.c
1
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)
|
||||
{
|
||||
|
@ -40,6 +40,7 @@ screen_write_start(
|
||||
}
|
||||
|
||||
/* Finish writing. */
|
||||
/* ARGSUSED */
|
||||
void
|
||||
screen_write_stop(unused struct screen_write_ctx *ctx)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -396,6 +396,7 @@ server_clear_identify(struct client *c)
|
||||
}
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
server_callback_identify(unused int fd, unused short events, void *data)
|
||||
{
|
||||
|
3
server.c
3
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)
|
||||
{
|
||||
|
@ -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) {
|
||||
|
1
status.c
1
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)
|
||||
{
|
||||
|
2
tmux.c
2
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)
|
||||
{
|
||||
|
4
tmux.h
4
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 *);
|
||||
|
@ -555,6 +555,7 @@ handle_key:
|
||||
}
|
||||
|
||||
/* Key timer callback. */
|
||||
/* ARGSUSED */
|
||||
void
|
||||
tty_keys_callback(unused int fd, unused short events, void *data)
|
||||
{
|
||||
|
8
tty.c
8
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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
6
window.c
6
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)
|
||||
|
Loading…
Reference in New Issue
Block a user