summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window-customize.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2021-01-18 11:14:23 +0000
committernicm <nicm@openbsd.org>2021-01-18 11:14:23 +0000
commit8f1cd816be736c854135264b593aea6d686bc62e (patch)
tree3a07eb9ef24fba9422a33acbd445e55a13f5b52b /usr.bin/tmux/window-customize.c
parentThere is no need to clear every line entirely before drawing to it, this (diff)
downloadwireguard-openbsd-8f1cd816be736c854135264b593aea6d686bc62e.tar.xz
wireguard-openbsd-8f1cd816be736c854135264b593aea6d686bc62e.zip
Hide some warnings on newer GCC versions, GitHUb issue 2525.
Diffstat (limited to 'usr.bin/tmux/window-customize.c')
-rw-r--r--usr.bin/tmux/window-customize.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/tmux/window-customize.c b/usr.bin/tmux/window-customize.c
index b6d81cccd6d..f354013b3ed 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.7 2020/09/18 11:20:59 nicm Exp $ */
+/* $OpenBSD: window-customize.c,v 1.8 2021/01/18 11:14:24 nicm Exp $ */
/*
* Copyright (c) 2020 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -190,13 +190,6 @@ window_customize_scope_text(enum window_customize_scope scope,
u_int idx;
switch (scope) {
- case WINDOW_CUSTOMIZE_NONE:
- case WINDOW_CUSTOMIZE_KEY:
- case WINDOW_CUSTOMIZE_SERVER:
- case WINDOW_CUSTOMIZE_GLOBAL_SESSION:
- case WINDOW_CUSTOMIZE_GLOBAL_WINDOW:
- s = xstrdup("");
- break;
case WINDOW_CUSTOMIZE_PANE:
window_pane_index(fs->wp, &idx);
xasprintf(&s, "pane %u", idx);
@@ -207,6 +200,9 @@ window_customize_scope_text(enum window_customize_scope scope,
case WINDOW_CUSTOMIZE_WINDOW:
xasprintf(&s, "window %u", fs->wl->idx);
break;
+ default:
+ s = xstrdup("");
+ break;
}
return (s);
}