diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-18 14:27:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-18 14:27:45 +0000 |
commit | 020d2c76b774d1f4b19f7683a6f163fcc584251a (patch) | |
tree | 0de13b4a9e55168d93b3e924c3c3235d96714099 | |
parent | 7e9a8899f550ff0eb982e12e65e70acbc1391660 (diff) |
Use __unused rather than rolling our own.
30 files changed, 98 insertions, 99 deletions
diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c index 90281b10702..cfe1a5d3ccd 100644 --- a/usr.bin/tmux/alerts.c +++ b/usr.bin/tmux/alerts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alerts.c,v 1.4 2015/10/27 15:58:42 nicm Exp $ */ +/* $OpenBSD: alerts.c,v 1.5 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net> @@ -35,7 +35,7 @@ int alerts_check_silence(struct session *, struct winlink *); void alerts_ring_bell(struct session *); void -alerts_timer(unused int fd, unused short events, void *arg) +alerts_timer(__unused int fd, __unused short events, void *arg) { struct window *w = arg; @@ -45,7 +45,7 @@ alerts_timer(unused int fd, unused short events, void *arg) } void -alerts_callback(unused int fd, unused short events, unused void *arg) +alerts_callback(__unused int fd, __unused short events, __unused void *arg) { struct window *w; struct session *s; diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c index 7f2c4abbe31..699adcfe2b0 100644 --- a/usr.bin/tmux/cfg.c +++ b/usr.bin/tmux/cfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cfg.c,v 1.42 2015/09/09 12:09:21 nicm Exp $ */ +/* $OpenBSD: cfg.c,v 1.43 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -133,7 +133,7 @@ load_cfg(const char *path, struct cmd_q *cmdq, char **cause) } void -cfg_default_done(unused struct cmd_q *cmdq) +cfg_default_done(__unused struct cmd_q *cmdq) { if (--cfg_references != 0) return; diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index 56ec2d3174b..5fc9062df0a 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.105 2015/11/15 14:32:48 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.106 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -410,7 +410,8 @@ client_send_identify(const char *ttynam, const char *cwd) /* Callback for client stdin read events. */ void -client_stdin_callback(unused int fd, unused short events, unused void *arg) +client_stdin_callback(__unused int fd, __unused short events, + __unused void *arg) { struct msg_stdin_data data; @@ -512,7 +513,7 @@ client_signal(int sig) /* Callback for client read events. */ void -client_dispatch(struct imsg *imsg, unused void *arg) +client_dispatch(struct imsg *imsg, __unused void *arg) { if (imsg == NULL) { client_exitreason = CLIENT_EXIT_LOST_SERVER; diff --git a/usr.bin/tmux/cmd-kill-server.c b/usr.bin/tmux/cmd-kill-server.c index 993dde9d7ad..4948785858a 100644 --- a/usr.bin/tmux/cmd-kill-server.c +++ b/usr.bin/tmux/cmd-kill-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-server.c,v 1.13 2014/10/20 22:29:25 nicm Exp $ */ +/* $OpenBSD: cmd-kill-server.c,v 1.14 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -46,7 +46,7 @@ const struct cmd_entry cmd_start_server_entry = { }; enum cmd_retval -cmd_kill_server_exec(struct cmd *self, unused struct cmd_q *cmdq) +cmd_kill_server_exec(struct cmd *self, __unused struct cmd_q *cmdq) { if (self->entry == &cmd_kill_server_entry) kill(getpid(), SIGTERM); diff --git a/usr.bin/tmux/cmd-list-buffers.c b/usr.bin/tmux/cmd-list-buffers.c index 2c9cfcca0c4..a6d347d95fb 100644 --- a/usr.bin/tmux/cmd-list-buffers.c +++ b/usr.bin/tmux/cmd-list-buffers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-buffers.c,v 1.25 2015/11/12 11:09:11 nicm Exp $ */ +/* $OpenBSD: cmd-list-buffers.c,v 1.26 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -41,7 +41,7 @@ const struct cmd_entry cmd_list_buffers_entry = { }; enum cmd_retval -cmd_list_buffers_exec(unused struct cmd *self, struct cmd_q *cmdq) +cmd_list_buffers_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; struct paste_buffer *pb; diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c index 89107b70336..5490326d944 100644 --- a/usr.bin/tmux/cmd-list-keys.c +++ b/usr.bin/tmux/cmd-list-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-keys.c,v 1.29 2015/11/12 12:43:36 nicm Exp $ */ +/* $OpenBSD: cmd-list-keys.c,v 1.30 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -30,7 +30,7 @@ enum cmd_retval cmd_list_keys_exec(struct cmd *, struct cmd_q *); enum cmd_retval cmd_list_keys_table(struct cmd *, struct cmd_q *); -enum cmd_retval cmd_list_keys_commands(struct cmd *, struct cmd_q *); +enum cmd_retval cmd_list_keys_commands(struct cmd_q *); const struct cmd_entry cmd_list_keys_entry = { "list-keys", "lsk", @@ -60,7 +60,7 @@ cmd_list_keys_exec(struct cmd *self, struct cmd_q *cmdq) int repeat, width, tablewidth, keywidth; if (self->entry == &cmd_list_commands_entry) - return (cmd_list_keys_commands(self, cmdq)); + return (cmd_list_keys_commands(cmdq)); if (args_has(args, 't')) return (cmd_list_keys_table(self, cmdq)); @@ -178,7 +178,7 @@ cmd_list_keys_table(struct cmd *self, struct cmd_q *cmdq) } enum cmd_retval -cmd_list_keys_commands(unused struct cmd *self, struct cmd_q *cmdq) +cmd_list_keys_commands(struct cmd_q *cmdq) { const struct cmd_entry **entryp; const struct cmd_entry *entry; diff --git a/usr.bin/tmux/cmd-lock-server.c b/usr.bin/tmux/cmd-lock-server.c index a26bf012cf2..80d1be968e5 100644 --- a/usr.bin/tmux/cmd-lock-server.c +++ b/usr.bin/tmux/cmd-lock-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-lock-server.c,v 1.17 2014/10/20 22:29:25 nicm Exp $ */ +/* $OpenBSD: cmd-lock-server.c,v 1.18 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -51,7 +51,7 @@ const struct cmd_entry cmd_lock_client_entry = { }; enum cmd_retval -cmd_lock_server_exec(struct cmd *self, unused struct cmd_q *cmdq) +cmd_lock_server_exec(struct cmd *self, __unused struct cmd_q *cmdq) { struct args *args = self->args; struct client *c; diff --git a/usr.bin/tmux/cmd-pipe-pane.c b/usr.bin/tmux/cmd-pipe-pane.c index 4c9c0002a80..7a706811b5f 100644 --- a/usr.bin/tmux/cmd-pipe-pane.c +++ b/usr.bin/tmux/cmd-pipe-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-pipe-pane.c,v 1.29 2015/02/06 17:11:39 nicm Exp $ */ +/* $OpenBSD: cmd-pipe-pane.c,v 1.30 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -142,8 +142,8 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmd_q *cmdq) } void -cmd_pipe_pane_error_callback( - unused struct bufferevent *bufev, unused short what, void *data) +cmd_pipe_pane_error_callback(__unused struct bufferevent *bufev, + __unused short what, void *data) { struct window_pane *wp = data; diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c index 5020e045b22..6e7d94c1f88 100644 --- a/usr.bin/tmux/cmd-set-option.c +++ b/usr.bin/tmux/cmd-set-option.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-set-option.c,v 1.85 2015/11/12 11:05:34 nicm Exp $ */ +/* $OpenBSD: cmd-set-option.c,v 1.86 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -350,7 +350,7 @@ cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq, /* Set a string option. */ struct options_entry * -cmd_set_option_string(struct cmd *self, unused struct cmd_q *cmdq, +cmd_set_option_string(struct cmd *self, __unused struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { @@ -372,7 +372,7 @@ cmd_set_option_string(struct cmd *self, unused struct cmd_q *cmdq, /* Set a number option. */ struct options_entry * -cmd_set_option_number(unused struct cmd *self, struct cmd_q *cmdq, +cmd_set_option_number(__unused struct cmd *self, struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { @@ -390,7 +390,7 @@ cmd_set_option_number(unused struct cmd *self, struct cmd_q *cmdq, /* Set a key option. */ struct options_entry * -cmd_set_option_key(unused struct cmd *self, struct cmd_q *cmdq, +cmd_set_option_key(__unused struct cmd *self, struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { @@ -406,7 +406,7 @@ cmd_set_option_key(unused struct cmd *self, struct cmd_q *cmdq, /* Set a colour option. */ struct options_entry * -cmd_set_option_colour(unused struct cmd *self, struct cmd_q *cmdq, +cmd_set_option_colour(__unused struct cmd *self, struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { @@ -422,7 +422,7 @@ cmd_set_option_colour(unused struct cmd *self, struct cmd_q *cmdq, /* Set an attributes option. */ struct options_entry * -cmd_set_option_attributes(unused struct cmd *self, struct cmd_q *cmdq, +cmd_set_option_attributes(__unused struct cmd *self, struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { @@ -438,7 +438,7 @@ cmd_set_option_attributes(unused struct cmd *self, struct cmd_q *cmdq, /* Set a flag option. */ struct options_entry * -cmd_set_option_flag(unused struct cmd *self, struct cmd_q *cmdq, +cmd_set_option_flag(__unused struct cmd *self, struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { @@ -466,7 +466,7 @@ cmd_set_option_flag(unused struct cmd *self, struct cmd_q *cmdq, /* Set a choice option. */ struct options_entry * -cmd_set_option_choice(unused struct cmd *self, struct cmd_q *cmdq, +cmd_set_option_choice(__unused struct cmd *self, struct cmd_q *cmdq, const struct options_table_entry *oe, struct options *oo, const char *value) { diff --git a/usr.bin/tmux/cmd-wait-for.c b/usr.bin/tmux/cmd-wait-for.c index cdddf9002e2..8dd7a906d9f 100644 --- a/usr.bin/tmux/cmd-wait-for.c +++ b/usr.bin/tmux/cmd-wait-for.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-wait-for.c,v 1.10 2015/10/20 21:12:08 nicm Exp $ */ +/* $OpenBSD: cmd-wait-for.c,v 1.11 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net> @@ -111,7 +111,7 @@ cmd_wait_for_remove(struct wait_channel *wc) } enum cmd_retval -cmd_wait_for_exec(struct cmd *self, unused struct cmd_q *cmdq) +cmd_wait_for_exec(struct cmd *self, struct cmd_q *cmdq) { struct args *args = self->args; const char *name = args->argv[0]; @@ -130,7 +130,7 @@ cmd_wait_for_exec(struct cmd *self, unused struct cmd_q *cmdq) } enum cmd_retval -cmd_wait_for_signal(unused struct cmd_q *cmdq, const char *name, +cmd_wait_for_signal(__unused struct cmd_q *cmdq, const char *name, struct wait_channel *wc) { struct cmd_q *wq, *wq1; diff --git a/usr.bin/tmux/control-notify.c b/usr.bin/tmux/control-notify.c index f5ec4bdd0ac..1a34fb31ce0 100644 --- a/usr.bin/tmux/control-notify.c +++ b/usr.bin/tmux/control-notify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control-notify.c,v 1.12 2015/11/13 10:00:26 nicm Exp $ */ +/* $OpenBSD: control-notify.c,v 1.13 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott <nicm@users.sourceforge.net> @@ -101,7 +101,7 @@ control_notify_window_layout_changed(struct window *w) } void -control_notify_window_unlinked(unused struct session *s, struct window *w) +control_notify_window_unlinked(__unused struct session *s, struct window *w) { struct client *c; struct session *cs; @@ -119,7 +119,7 @@ control_notify_window_unlinked(unused struct session *s, struct window *w) } void -control_notify_window_linked(unused struct session *s, struct window *w) +control_notify_window_linked(__unused struct session *s, struct window *w) { struct client *c; struct session *cs; @@ -183,7 +183,7 @@ control_notify_session_renamed(struct session *s) } void -control_notify_session_created(unused struct session *s) +control_notify_session_created(__unused struct session *s) { struct client *c; @@ -196,7 +196,7 @@ control_notify_session_created(unused struct session *s) } void -control_notify_session_close(unused struct session *s) +control_notify_session_close(__unused struct session *s) { struct client *c; diff --git a/usr.bin/tmux/control.c b/usr.bin/tmux/control.c index dc689bb5352..26075bb02df 100644 --- a/usr.bin/tmux/control.c +++ b/usr.bin/tmux/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.15 2015/11/14 09:41:06 nicm Exp $ */ +/* $OpenBSD: control.c,v 1.16 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott <nicm@users.sourceforge.net> @@ -51,7 +51,7 @@ control_write_buffer(struct client *c, struct evbuffer *buffer) /* Control input callback. Read lines and fire commands. */ void -control_callback(struct client *c, int closed, unused void *data) +control_callback(struct client *c, int closed, __unused void *data) { char *line, *cause; struct cmd_list *cmdlist; diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 56ef9694ec4..14937cea724 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.98 2015/11/18 14:13:55 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.99 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -259,7 +259,7 @@ format_job_get(struct format_tree *ft, const char *cmd) /* Remove old jobs. */ void -format_job_timer(unused int fd, unused short events, unused void *arg) +format_job_timer(__unused int fd, __unused short events, __unused void *arg) { struct format_job *fj, *fj1; time_t now; @@ -288,7 +288,7 @@ format_job_timer(unused int fd, unused short events, unused void *arg) /* Callback for host. */ void -format_cb_host(unused struct format_tree *ft, struct format_entry *fe) +format_cb_host(__unused struct format_tree *ft, struct format_entry *fe) { char host[HOST_NAME_MAX + 1]; @@ -300,7 +300,7 @@ format_cb_host(unused struct format_tree *ft, struct format_entry *fe) /* Callback for host_short. */ void -format_cb_host_short(unused struct format_tree *ft, struct format_entry *fe) +format_cb_host_short(__unused struct format_tree *ft, struct format_entry *fe) { char host[HOST_NAME_MAX + 1], *cp; @@ -315,7 +315,7 @@ format_cb_host_short(unused struct format_tree *ft, struct format_entry *fe) /* Callback for pid. */ void -format_cb_pid(unused struct format_tree *ft, struct format_entry *fe) +format_cb_pid(__unused struct format_tree *ft, struct format_entry *fe) { xasprintf(&fe->value, "%ld", (long)getpid()); } diff --git a/usr.bin/tmux/job.c b/usr.bin/tmux/job.c index ade884d008d..ab4f5b8bdf0 100644 --- a/usr.bin/tmux/job.c +++ b/usr.bin/tmux/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.38 2015/10/31 08:13:58 nicm Exp $ */ +/* $OpenBSD: job.c,v 1.39 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -150,7 +150,7 @@ job_free(struct job *job) /* Called when output buffer falls below low watermark (default is 0). */ void -job_write_callback(unused struct bufferevent *bufev, void *data) +job_write_callback(__unused struct bufferevent *bufev, void *data) { struct job *job = data; size_t len = EVBUFFER_LENGTH(EVBUFFER_OUTPUT(job->event)); @@ -166,7 +166,8 @@ job_write_callback(unused struct bufferevent *bufev, void *data) /* Job buffer error callback. */ void -job_callback(unused struct bufferevent *bufev, unused short events, void *data) +job_callback(__unused struct bufferevent *bufev, __unused short events, + void *data) { struct job *job = data; diff --git a/usr.bin/tmux/log.c b/usr.bin/tmux/log.c index 5e7cbef5380..f89cd7c73cb 100644 --- a/usr.bin/tmux/log.c +++ b/usr.bin/tmux/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.18 2015/11/18 13:06:54 nicm Exp $ */ +/* $OpenBSD: log.c,v 1.19 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -33,7 +33,7 @@ void log_vwrite(const char *, va_list); /* Log callback for libevent. */ void -log_event_cb(unused int severity, const char *msg) +log_event_cb(__unused int severity, const char *msg) { log_debug("%s", msg); } diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c index a4ccb19c511..8340d5799b7 100644 --- a/usr.bin/tmux/names.c +++ b/usr.bin/tmux/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.30 2015/10/27 15:58:42 nicm Exp $ */ +/* $OpenBSD: names.c,v 1.31 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -29,7 +29,7 @@ void name_time_callback(int, short, void *); int name_time_expired(struct window *, struct timeval *); void -name_time_callback(unused int fd, unused short events, void *arg) +name_time_callback(__unused int fd, __unused short events, void *arg) { struct window *w = arg; diff --git a/usr.bin/tmux/proc.c b/usr.bin/tmux/proc.c index 0079d866d65..9ba65c04f88 100644 --- a/usr.bin/tmux/proc.c +++ b/usr.bin/tmux/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.3 2015/10/31 13:43:38 nicm Exp $ */ +/* $OpenBSD: proc.c,v 1.4 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net> @@ -53,7 +53,7 @@ static int peer_check_version(struct tmuxpeer *, struct imsg *); static void proc_update_event(struct tmuxpeer *); static void -proc_event_cb(unused int fd, short events, void *arg) +proc_event_cb(__unused int fd, short events, void *arg) { struct tmuxpeer *peer = arg; ssize_t n; @@ -101,7 +101,7 @@ proc_event_cb(unused int fd, short events, void *arg) } static void -proc_signal_cb(int signo, unused short events, void *arg) +proc_signal_cb(int signo, __unused short events, void *arg) { struct tmuxproc *tp = arg; diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index c49e9b433ec..e470cc4fbe6 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.79 2015/11/14 11:45:43 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.80 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -42,7 +42,7 @@ screen_write_start(struct screen_write_ctx *ctx, struct window_pane *wp, /* Finish writing. */ void -screen_write_stop(unused struct screen_write_ctx *ctx) +screen_write_stop(__unused struct screen_write_ctx *ctx) { } diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 7314a77dc0d..733c0804cc8 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.169 2015/11/14 09:41:06 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.170 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -246,7 +246,7 @@ server_client_unref(struct client *c) /* Free dead client. */ void -server_client_free(unused int fd, unused short events, void *arg) +server_client_free(__unused int fd, __unused short events, void *arg) { struct client *c = arg; @@ -818,7 +818,7 @@ server_client_reset_state(struct client *c) /* Repeat time callback. */ 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) { struct client *c = data; @@ -1214,7 +1214,7 @@ server_client_dispatch_shell(struct client *c) /* Event callback to push more stdout data if any left. */ static void -server_client_stdout_cb(unused int fd, unused short events, void *arg) +server_client_stdout_cb(__unused int fd, __unused short events, void *arg) { struct client *c = arg; @@ -1255,7 +1255,7 @@ server_client_push_stdout(struct client *c) /* Event callback to push more stderr data if any left. */ static void -server_client_stderr_cb(unused int fd, unused short events, void *arg) +server_client_stderr_cb(__unused int fd, __unused short events, void *arg) { struct client *c = arg; diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index dc9edfdf035..a0ee5a7c158 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.92 2015/11/14 09:41:07 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.93 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -443,7 +443,7 @@ server_clear_identify(struct client *c) } void -server_callback_identify(unused int fd, unused short events, void *data) +server_callback_identify(__unused int fd, __unused short events, void *data) { struct client *c = data; diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 03aa14fd681..b18ce50647e 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.149 2015/11/15 14:32:48 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.150 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -298,7 +298,7 @@ server_update_socket(void) /* Callback for server socket. */ void -server_accept(int fd, short events, unused void *data) +server_accept(int fd, short events, __unused void *data) { struct sockaddr_storage sa; socklen_t slen = sizeof sa; diff --git a/usr.bin/tmux/session.c b/usr.bin/tmux/session.c index da6ade9844a..fe65fb47121 100644 --- a/usr.bin/tmux/session.c +++ b/usr.bin/tmux/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.59 2015/11/18 09:22:29 nicm Exp $ */ +/* $OpenBSD: session.c,v 1.60 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -181,7 +181,7 @@ session_unref(struct session *s) /* Free session. */ void -session_free(unused int fd, unused short events, void *arg) +session_free(__unused int fd, __unused short events, void *arg) { struct session *s = arg; @@ -236,7 +236,7 @@ session_check_name(const char *name) /* Lock session if it has timed out. */ void -session_lock_timer(unused int fd, unused short events, void *arg) +session_lock_timer(__unused int fd, __unused short events, void *arg) { struct session *s = arg; diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 3592979b7a1..595c55f1301 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.140 2015/11/13 08:09:28 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.141 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -145,7 +145,7 @@ status_prompt_save_history(void) /* Status timer callback. */ void -status_timer_callback(unused int fd, unused short events, void *arg) +status_timer_callback(__unused int fd, __unused short events, void *arg) { struct client *c = arg; struct session *s = c->session; @@ -604,7 +604,7 @@ status_message_clear(struct client *c) /* Clear status line message after timer expires. */ void -status_message_callback(unused int fd, unused short event, void *data) +status_message_callback(__unused int fd, __unused short event, void *data) { struct client *c = data; diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index 98d4590e78a..fdae389a737 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.581 2015/11/18 13:06:54 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.582 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -69,9 +69,6 @@ struct tmuxproc; #define READ_BACKOFF 512 #define READ_TIME 100 -/* Definition to shut gcc up about unused arguments. */ -#define unused __attribute__ ((unused)) - /* Attribute to make gcc check printf-like arguments. */ #define printflike(a, b) __attribute__ ((format (printf, a, b))) diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c index a4f8ea86cba..1142b4ce589 100644 --- a/usr.bin/tmux/tty-keys.c +++ b/usr.bin/tmux/tty-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-keys.c,v 1.80 2015/11/14 11:45:43 nicm Exp $ */ +/* $OpenBSD: tty-keys.c,v 1.81 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -635,7 +635,7 @@ discard_key: /* Key timer callback. */ void -tty_keys_callback(unused int fd, unused short events, void *data) +tty_keys_callback(__unused int fd, __unused short events, void *data) { struct tty *tty = data; diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index cb7ede09f03..4bcedab186f 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.193 2015/11/13 08:09:28 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.194 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -172,7 +172,7 @@ tty_open(struct tty *tty, char **cause) } void -tty_read_callback(unused struct bufferevent *bufev, void *data) +tty_read_callback(__unused struct bufferevent *bufev, void *data) { struct tty *tty = data; @@ -181,8 +181,8 @@ tty_read_callback(unused struct bufferevent *bufev, void *data) } void -tty_error_callback( - unused struct bufferevent *bufev, unused short what, unused void *data) +tty_error_callback(__unused struct bufferevent *bufev, __unused short what, + __unused void *data) { } @@ -591,7 +591,7 @@ tty_repeat_space(struct tty *tty, u_int n) * pane. */ int -tty_large_region(unused struct tty *tty, const struct tty_ctx *ctx) +tty_large_region(__unused struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; diff --git a/usr.bin/tmux/window-choose.c b/usr.bin/tmux/window-choose.c index 532ec12eea2..0460efa9c60 100644 --- a/usr.bin/tmux/window-choose.c +++ b/usr.bin/tmux/window-choose.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-choose.c,v 1.69 2015/11/12 11:09:11 nicm Exp $ */ +/* $OpenBSD: window-choose.c,v 1.70 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -509,8 +509,8 @@ window_choose_get_item(struct window_pane *wp, key_code key, } void -window_choose_key(struct window_pane *wp, unused struct client *c, - unused struct session *sess, key_code key, struct mouse_event *m) +window_choose_key(struct window_pane *wp, __unused struct client *c, + __unused struct session *sess, key_code key, struct mouse_event *m) { struct window_choose_mode_data *data = wp->modedata; struct screen *s = &data->screen; diff --git a/usr.bin/tmux/window-clock.c b/usr.bin/tmux/window-clock.c index 351702815d1..b7d215ea1ee 100644 --- a/usr.bin/tmux/window-clock.c +++ b/usr.bin/tmux/window-clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-clock.c,v 1.15 2015/11/12 11:05:34 nicm Exp $ */ +/* $OpenBSD: window-clock.c,v 1.16 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -120,7 +120,7 @@ const char window_clock_table[14][5][5] = { }; void -window_clock_timer_callback(unused int fd, unused short events, void *arg) +window_clock_timer_callback(__unused int fd, __unused short events, void *arg) { struct window_pane *wp = arg; struct window_clock_mode_data *data = wp->modedata; @@ -185,9 +185,9 @@ window_clock_resize(struct window_pane *wp, u_int sx, u_int sy) } void -window_clock_key(struct window_pane *wp, unused struct client *c, - unused struct session *sess, unused key_code key, - unused struct mouse_event *m) +window_clock_key(struct window_pane *wp, __unused struct client *c, + __unused struct session *sess, __unused key_code key, + __unused struct mouse_event *m) { window_pane_reset_mode(wp); } diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 8ed0f133b46..ec7fe3467b0 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.140 2015/11/13 08:09:28 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.141 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -2232,7 +2232,7 @@ window_copy_rectangle_toggle(struct window_pane *wp) } void -window_copy_start_drag(struct client *c, unused struct mouse_event *m) +window_copy_start_drag(struct client *c, struct mouse_event *m) { struct window_pane *wp; u_int x, y; @@ -2253,7 +2253,7 @@ window_copy_start_drag(struct client *c, unused struct mouse_event *m) } void -window_copy_drag_update(unused struct client *c, struct mouse_event *m) +window_copy_drag_update(__unused struct client *c, struct mouse_event *m) { struct window_pane *wp; struct window_copy_mode_data *data; @@ -2274,7 +2274,7 @@ window_copy_drag_update(unused struct client *c, struct mouse_event *m) } void -window_copy_drag_release(unused struct client *c, struct mouse_event *m) +window_copy_drag_release(__unused struct client *c, struct mouse_event *m) { struct window_pane *wp; diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index a5de38a939d..bceb7bc049d 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.148 2015/11/12 11:05:34 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.149 2015/11/18 14:27:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -916,13 +916,13 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv, } void -window_pane_timer_callback(unused int fd, unused short events, void *data) +window_pane_timer_callback(__unused int fd, __unused short events, void *data) { window_pane_read_callback(NULL, data); } void -window_pane_read_callback(unused struct bufferevent *bufev, void *data) +window_pane_read_callback(__unused struct bufferevent *bufev, void *data) { struct window_pane *wp = data; struct evbuffer *evb = wp->event->input; @@ -968,8 +968,8 @@ start_timer: } void -window_pane_error_callback(unused struct bufferevent *bufev, unused short what, - void *data) +window_pane_error_callback(__unused struct bufferevent *bufev, + __unused short what, void *data) { struct window_pane *wp = data; |