summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window-customize.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-09-18 11:20:59 +0000
committernicm <nicm@openbsd.org>2020-09-18 11:20:59 +0000
commitcf415ead7251154627a807dd82f9ade7f80bc65c (patch)
tree98ab33595dc198bf160627825389276aa9f8dcfc /usr.bin/tmux/window-customize.c
parentzap redundant line (diff)
downloadwireguard-openbsd-cf415ead7251154627a807dd82f9ade7f80bc65c.tar.xz
wireguard-openbsd-cf415ead7251154627a807dd82f9ade7f80bc65c.zip
Some other warnings, GitHub issue 2382.
Diffstat (limited to 'usr.bin/tmux/window-customize.c')
-rw-r--r--usr.bin/tmux/window-customize.c8
1 files changed, 4 insertions, 4 deletions
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;