diff options
author | 2020-09-18 11:20:59 +0000 | |
---|---|---|
committer | 2020-09-18 11:20:59 +0000 | |
commit | cf415ead7251154627a807dd82f9ade7f80bc65c (patch) | |
tree | 98ab33595dc198bf160627825389276aa9f8dcfc | |
parent | zap redundant line (diff) | |
download | wireguard-openbsd-cf415ead7251154627a807dd82f9ade7f80bc65c.tar.xz wireguard-openbsd-cf415ead7251154627a807dd82f9ade7f80bc65c.zip |
Some other warnings, GitHub issue 2382.
-rw-r--r-- | usr.bin/tmux/control.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/input-keys.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/window-customize.c | 8 |
3 files changed, 10 insertions, 8 deletions
diff --git a/usr.bin/tmux/control.c b/usr.bin/tmux/control.c index 63c8f5b7bee..ee6d34c60a9 100644 --- a/usr.bin/tmux/control.c +++ b/usr.bin/tmux/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.44 2020/07/06 09:14:20 nicm Exp $ */ +/* $OpenBSD: control.c,v 1.45 2020/09/18 11:20:59 nicm Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -688,8 +688,8 @@ control_write_pending(struct client *c, struct control_pane *cp, size_t limit) else age = 0; log_debug("%s: %s: output block %zu (age %llu) for %%%u " - "(used %zu/%zu)", __func__, c->name, cb->size, age, - cp->pane, used, limit); + "(used %zu/%zu)", __func__, c->name, cb->size, + (unsigned long long)age, cp->pane, used, limit); size = cb->size; if (size > limit - used) diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c index ae2eccad7af..9f1716d3abe 100644 --- a/usr.bin/tmux/input-keys.c +++ b/usr.bin/tmux/input-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input-keys.c,v 1.79 2020/06/01 16:09:35 nicm Exp $ */ +/* $OpenBSD: input-keys.c,v 1.80 2020/09/18 11:20:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -556,6 +556,8 @@ input_key(struct screen *s, struct bufferevent *bev, key_code key) case KEYC_SHIFT|KEYC_META|KEYC_CTRL: modifier = '8'; break; + default: + fatalx("invalid key modifiers: %llx", key); } xsnprintf(tmp, sizeof tmp, "\033[%llu;%cu", outkey, modifier); bufferevent_write(bev, tmp, strlen(tmp)); diff --git a/usr.bin/tmux/window-customize.c b/usr.bin/tmux/window-customize.c index bdd2a40bb15..b6d81cccd6d 100644 --- a/usr.bin/tmux/window-customize.c +++ b/usr.bin/tmux/window-customize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-customize.c,v 1.6 2020/07/27 08:03:10 nicm Exp $ */ +/* $OpenBSD: window-customize.c,v 1.7 2020/09/18 11:20:59 nicm Exp $ */ /* * Copyright (c) 2020 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -380,7 +380,7 @@ window_customize_build_options(struct window_customize_modedata *data, struct format_tree *ft, const char *filter, struct cmd_find_state *fs) { struct mode_tree_item *top; - struct options_entry *o, *loop; + struct options_entry *o = NULL, *loop; const char **list = NULL, *name; u_int size = 0, i; enum window_customize_scope scope; @@ -1018,7 +1018,7 @@ window_customize_set_option(struct client *c, struct options *oo; struct window_customize_itemdata *new_item; int flag, idx = item->idx; - enum window_customize_scope scope; + enum window_customize_scope scope = WINDOW_CUSTOMIZE_NONE; u_int choice; const char *name = item->name, *space = ""; char *prompt, *value, *text; @@ -1031,7 +1031,7 @@ window_customize_set_option(struct client *c, return; oe = options_table_entry(o); - if (~oe->scope & OPTIONS_TABLE_PANE) + if (oe != NULL && ~oe->scope & OPTIONS_TABLE_PANE) pane = 0; if (oe != NULL && (oe->flags & OPTIONS_TABLE_IS_ARRAY)) { scope = item->scope; |