Hide some warnings on newer GCC versions, GitHUb issue 2525.

This commit is contained in:
nicm
2021-01-18 11:14:23 +00:00
parent 91d112bf12
commit 0730dce5ab
4 changed files with 28 additions and 34 deletions

View File

@ -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);
}