Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to

the rest to reduce lint output.
This commit is contained in:
Nicholas Marriott 2009-11-26 21:37:13 +00:00
parent 621dabd44e
commit 4ca857e0e9
32 changed files with 51 additions and 11 deletions

2
cfg.c
View File

@ -35,11 +35,13 @@ void printflike2 cfg_error(struct cmd_ctx *, const char *, ...);
char *cfg_cause; char *cfg_cause;
/* ARGSUSED */
void printflike2 void printflike2
cfg_print(unused struct cmd_ctx *ctx, unused const char *fmt, ...) cfg_print(unused struct cmd_ctx *ctx, unused const char *fmt, ...)
{ {
} }
/* ARGSUSED */
void printflike2 void printflike2
cfg_error(unused struct cmd_ctx *ctx, const char *fmt, ...) cfg_error(unused struct cmd_ctx *ctx, const char *fmt, ...)
{ {

View File

@ -222,6 +222,7 @@ out:
exit(client_exitval); exit(client_exitval);
} }
/* ARGSUSED */
void void
client_signal(int sig, unused short events, unused void *data) 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(); client_update_event();
} }
/* ARGSUSED */
void void
client_callback(unused int fd, short events, unused void *data) client_callback(unused int fd, short events, unused void *data)
{ {

View File

@ -51,6 +51,7 @@ const struct cmd_entry cmd_copy_buffer_entry = {
cmd_copy_buffer_print cmd_copy_buffer_print
}; };
/* ARGSUSED */
void void
cmd_copy_buffer_init(struct cmd *self, unused int arg) cmd_copy_buffer_init(struct cmd *self, unused int arg)
{ {

View File

@ -148,6 +148,7 @@ cmd_fill_argument(int flags, char **arg, char **arg2, int argc, char **argv)
return (0); return (0);
} }
/* ARGSUSED */
void void
cmd_target_init(struct cmd *self, unused int key) 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); return (off);
} }
/* ARGSUSED */
void void
cmd_srcdst_init(struct cmd *self, unused int key) 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); return (off);
} }
/* ARGSUSED */
void void
cmd_buffer_init(struct cmd *self, unused int key) cmd_buffer_init(struct cmd *self, unused int key)
{ {

View File

@ -40,6 +40,7 @@ const struct cmd_entry cmd_kill_server_entry = {
NULL NULL
}; };
/* ARGSUSED */
int int
cmd_kill_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx) cmd_kill_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx)
{ {

View File

@ -40,6 +40,7 @@ const struct cmd_entry cmd_list_clients_entry = {
NULL NULL
}; };
/* ARGSUSED */
int int
cmd_list_clients_exec(unused struct cmd *self, struct cmd_ctx *ctx) cmd_list_clients_exec(unused struct cmd *self, struct cmd_ctx *ctx)
{ {

View File

@ -37,6 +37,7 @@ const struct cmd_entry cmd_list_commands_entry = {
NULL NULL
}; };
/* ARGSUSED */
int int
cmd_list_commands_exec(unused struct cmd *self, struct cmd_ctx *ctx) cmd_list_commands_exec(unused struct cmd *self, struct cmd_ctx *ctx)
{ {

View File

@ -39,6 +39,7 @@ const struct cmd_entry cmd_list_sessions_entry = {
NULL NULL
}; };
/* ARGSUSED */
int int
cmd_list_sessions_exec(unused struct cmd *self, struct cmd_ctx *ctx) cmd_list_sessions_exec(unused struct cmd *self, struct cmd_ctx *ctx)
{ {

View File

@ -41,6 +41,7 @@ const struct cmd_entry cmd_lock_server_entry = {
NULL, NULL,
}; };
/* ARGSUSED */
int int
cmd_lock_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx) cmd_lock_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx)
{ {

View File

@ -52,6 +52,7 @@ const struct cmd_entry cmd_new_session_entry = {
cmd_new_session_print cmd_new_session_print
}; };
/* ARGSUSED */
void void
cmd_new_session_init(struct cmd *self, unused int arg) cmd_new_session_init(struct cmd *self, unused int arg)
{ {

View File

@ -51,6 +51,7 @@ const struct cmd_entry cmd_new_window_entry = {
cmd_new_window_print cmd_new_window_print
}; };
/* ARGSUSED */
void void
cmd_new_window_init(struct cmd *self, unused int arg) cmd_new_window_init(struct cmd *self, unused int arg)
{ {

View File

@ -129,6 +129,7 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
} }
} }
/* ARGSUSED */
void void
cmd_pipe_pane_error_callback( cmd_pipe_pane_error_callback(
unused struct bufferevent *bufev, unused short what, void *data) unused struct bufferevent *bufev, unused short what, void *data)

View File

@ -44,6 +44,7 @@ const struct cmd_entry cmd_server_info_entry = {
NULL NULL
}; };
/* ARGSUSED */
int int
cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx) cmd_server_info_exec(unused struct cmd *self, struct cmd_ctx *ctx)
{ {

View File

@ -45,6 +45,7 @@ const struct cmd_entry cmd_source_file_entry = {
cmd_source_file_print cmd_source_file_print
}; };
/* ARGSUSED */
void void
cmd_source_file_init(struct cmd *self, unused int arg) cmd_source_file_init(struct cmd *self, unused int arg)
{ {

View File

@ -37,6 +37,7 @@ const struct cmd_entry cmd_start_server_entry = {
NULL NULL
}; };
/* ARGSUSED */
int int
cmd_start_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx) cmd_start_server_exec(unused struct cmd *self, unused struct cmd_ctx *ctx)
{ {

1
job.c
View File

@ -192,6 +192,7 @@ job_run(struct job *job)
} }
/* Job buffer error callback. */ /* Job buffer error callback. */
/* ARGSUSED */
void void
job_callback(unused struct bufferevent *bufev, unused short events, void *data) job_callback(unused struct bufferevent *bufev, unused short events, void *data)
{ {

View File

@ -41,6 +41,7 @@ queue_window_name(struct window *w)
evtimer_add(&w->name_timer, &tv); evtimer_add(&w->name_timer, &tv);
} }
/* ARGSUSED */
void void
window_name_callback(unused int fd, unused short events, void *data) window_name_callback(unused int fd, unused short events, void *data)
{ {

View File

@ -40,6 +40,7 @@ screen_write_start(
} }
/* Finish writing. */ /* Finish writing. */
/* ARGSUSED */
void void
screen_write_stop(unused struct screen_write_ctx *ctx) screen_write_stop(unused struct screen_write_ctx *ctx)
{ {

View File

@ -427,6 +427,7 @@ server_client_reset_state(struct client *c)
} }
/* Repeat time callback. */ /* Repeat time callback. */
/* ARGSUSED */
void void
server_client_repeat_timer(unused int fd, unused short events, void *data) server_client_repeat_timer(unused int fd, unused short events, void *data)
{ {

View File

@ -396,6 +396,7 @@ server_clear_identify(struct client *c)
} }
} }
/* ARGSUSED */
void void
server_callback_identify(unused int fd, unused short events, void *data) server_callback_identify(unused int fd, unused short events, void *data)
{ {

View File

@ -314,6 +314,7 @@ server_update_socket(void)
} }
/* Callback for server socket. */ /* Callback for server socket. */
/* ARGSUSED */
void void
server_accept_callback(int fd, short events, unused void *data) server_accept_callback(int fd, short events, unused void *data)
{ {
@ -389,6 +390,7 @@ server_signal_clear(void)
} }
/* Signal handler. */ /* Signal handler. */
/* ARGSUSED */
void void
server_signal_callback(int sig, unused short events, unused void *data) 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. */ /* Handle once-per-second timer events. */
/* ARGSUSED */
void void
server_second_callback(unused int fd, unused short events, unused void *arg) server_second_callback(unused int fd, unused short events, unused void *arg)
{ {

View File

@ -319,7 +319,7 @@ session_next_activity(struct session *s, struct winlink *wl)
break; break;
if (session_alert_has(s, wl, WINDOW_CONTENT)) if (session_alert_has(s, wl, WINDOW_CONTENT))
break; break;
wl = winlink_next(&s->windows, wl); wl = winlink_next(wl);
} }
return (wl); return (wl);
} }
@ -333,7 +333,7 @@ session_next(struct session *s, int activity)
if (s->curw == NULL) if (s->curw == NULL)
return (-1); return (-1);
wl = winlink_next(&s->windows, s->curw); wl = winlink_next(s->curw);
if (activity) if (activity)
wl = session_next_activity(s, wl); wl = session_next_activity(s, wl);
if (wl == NULL) { if (wl == NULL) {
@ -360,7 +360,7 @@ session_previous_activity(struct session *s, struct winlink *wl)
break; break;
if (session_alert_has(s, wl, WINDOW_CONTENT)) if (session_alert_has(s, wl, WINDOW_CONTENT))
break; break;
wl = winlink_previous(&s->windows, wl); wl = winlink_previous(wl);
} }
return (wl); return (wl);
} }
@ -374,7 +374,7 @@ session_previous(struct session *s, int activity)
if (s->curw == NULL) if (s->curw == NULL)
return (-1); return (-1);
wl = winlink_previous(&s->windows, s->curw); wl = winlink_previous(s->curw);
if (activity) if (activity)
wl = session_previous_activity(s, wl); wl = session_previous_activity(s, wl);
if (wl == NULL) { if (wl == NULL) {

View File

@ -688,6 +688,7 @@ status_message_clear(struct client *c)
} }
/* Clear status line message after timer expires. */ /* Clear status line message after timer expires. */
/* ARGSUSED */
void void
status_message_callback(unused int fd, unused short event, void *data) status_message_callback(unused int fd, unused short event, void *data)
{ {

2
tmux.c
View File

@ -554,6 +554,7 @@ main_clear_signals(void)
event_del(&main_ev_sigterm); event_del(&main_ev_sigterm);
} }
/* ARGSUSED */
void void
main_signal(int sig, unused short events, unused void *data) 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 void
main_callback(unused int fd, short events, void *data) main_callback(unused int fd, short events, void *data)
{ {

4
tmux.h
View File

@ -1790,8 +1790,8 @@ int winlink_next_index(struct winlinks *, int);
u_int winlink_count(struct winlinks *); u_int winlink_count(struct winlinks *);
struct winlink *winlink_add(struct winlinks *, struct window *, int); struct winlink *winlink_add(struct winlinks *, struct window *, int);
void winlink_remove(struct winlinks *, struct winlink *); void winlink_remove(struct winlinks *, struct winlink *);
struct winlink *winlink_next(struct winlinks *, struct winlink *); struct winlink *winlink_next(struct winlink *);
struct winlink *winlink_previous(struct winlinks *, struct winlink *); struct winlink *winlink_previous(struct winlink *);
void winlink_stack_push(struct winlink_stack *, struct winlink *); void winlink_stack_push(struct winlink_stack *, struct winlink *);
void winlink_stack_remove(struct winlink_stack *, struct winlink *); void winlink_stack_remove(struct winlink_stack *, struct winlink *);
int window_index(struct window *, u_int *); int window_index(struct window *, u_int *);

View File

@ -555,6 +555,7 @@ handle_key:
} }
/* Key timer callback. */ /* Key timer callback. */
/* ARGSUSED */
void void
tty_keys_callback(unused int fd, unused short events, void *data) tty_keys_callback(unused int fd, unused short events, void *data)
{ {

8
tty.c
View File

@ -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(struct tty *, const struct grid_cell *, int *);
void tty_colours_fg(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_redraw_region(struct tty *, const struct tty_ctx *);
void tty_emulate_repeat( void tty_emulate_repeat(
@ -125,6 +125,7 @@ tty_open(struct tty *tty, const char *overrides, char **cause)
return (0); return (0);
} }
/* ARGSUSED */
void void
tty_read_callback(unused struct bufferevent *bufev, void *data) tty_read_callback(unused struct bufferevent *bufev, void *data)
{ {
@ -134,6 +135,7 @@ tty_read_callback(unused struct bufferevent *bufev, void *data)
; ;
} }
/* ARGSUSED */
void void
tty_error_callback( tty_error_callback(
unused struct bufferevent *bufev, unused short what, unused void *data) 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 || if (!bg_default && (bg != tc->bg ||
((flags & GRID_FLAG_BG256) != (tc->flags & GRID_FLAG_BG256)))) ((flags & GRID_FLAG_BG256) != (tc->flags & GRID_FLAG_BG256))))
tty_colours_bg(tty, gc, attr); tty_colours_bg(tty, gc);
} }
void void
@ -1315,7 +1317,7 @@ save_fg:
} }
void 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; struct grid_cell *tc = &tty->cell;
u_char bg = gc->bg; u_char bg = gc->bg;

View File

@ -169,6 +169,7 @@ window_choose_resize(struct window_pane *wp, u_int sx, u_int sy)
window_choose_redraw_screen(wp); window_choose_redraw_screen(wp);
} }
/* ARGSUSED */
void void
window_choose_key(struct window_pane *wp, unused struct client *c, int key) 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 void
window_choose_mouse( window_choose_mouse(
struct window_pane *wp, unused struct client *c, struct mouse_event *m) struct window_pane *wp, unused struct client *c, struct mouse_event *m)

View File

@ -82,6 +82,7 @@ window_clock_resize(struct window_pane *wp, u_int sx, u_int sy)
window_clock_draw_screen(wp); window_clock_draw_screen(wp);
} }
/* ARGSUSED */
void void
window_clock_key( window_clock_key(
struct window_pane *wp, unused struct client *c, unused int key) struct window_pane *wp, unused struct client *c, unused int key)

View File

@ -435,6 +435,7 @@ window_copy_key_input(struct window_pane *wp, int key)
return (0); return (0);
} }
/* ARGSUSED */
void void
window_copy_mouse( window_copy_mouse(
struct window_pane *wp, unused struct client *c, struct mouse_event *m) struct window_pane *wp, unused struct client *c, struct mouse_event *m)

View File

@ -123,6 +123,7 @@ window_more_resize(struct window_pane *wp, u_int sx, u_int sy)
window_more_redraw_screen(wp); window_more_redraw_screen(wp);
} }
/* ARGSUSED */
void void
window_more_key(struct window_pane *wp, unused struct client *c, int key) window_more_key(struct window_pane *wp, unused struct client *c, int key)
{ {

View File

@ -161,13 +161,13 @@ winlink_remove(struct winlinks *wwl, struct winlink *wl)
} }
struct winlink * struct winlink *
winlink_next(unused struct winlinks *wwl, struct winlink *wl) winlink_next(struct winlink *wl)
{ {
return (RB_NEXT(winlinks, wwl, wl)); return (RB_NEXT(winlinks, wwl, wl));
} }
struct winlink * struct winlink *
winlink_previous(unused struct winlinks *wwl, struct winlink *wl) winlink_previous(struct winlink *wl)
{ {
return (RB_PREV(winlinks, wwl, 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); return (0);
} }
/* ARGSUSED */
void void
window_pane_read_callback(unused struct bufferevent *bufev, void *data) 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); window_pane_parse(wp);
} }
/* ARGSUSED */
void void
window_pane_error_callback( window_pane_error_callback(
unused struct bufferevent *bufev, unused short what, void *data) unused struct bufferevent *bufev, unused short what, void *data)