From ed946dccc76f87064f1b8299b6ea332db9ab6c19 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 18 Sep 2020 11:20:59 +0000 Subject: Some other warnings, GitHub issue 2382. --- control.c | 4 ++-- input-keys.c | 2 ++ window-customize.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/control.c b/control.c index c52f2020..e86429cf 100644 --- a/control.c +++ b/control.c @@ -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/input-keys.c b/input-keys.c index 938c530f..224bcfa5 100644 --- a/input-keys.c +++ b/input-keys.c @@ -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/window-customize.c b/window-customize.c index c8606245..1dad07cd 100644 --- a/window-customize.c +++ b/window-customize.c @@ -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; -- cgit