From 9fd62efcf0392cda0ddd1b7836e98da08d0a6f9f Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 15 Oct 2019 08:30:36 +0000 Subject: Rewrite options_array_set to be clearer and remove a spurious warning with newer GCC. From Ben Boeckel. --- window-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'window-tree.c') diff --git a/window-tree.c b/window-tree.c index cc16f274..4dce1fe8 100644 --- a/window-tree.c +++ b/window-tree.c @@ -191,7 +191,7 @@ window_tree_cmp_session(const void *a0, const void *b0) const struct session *const *b = b0; const struct session *sa = *a; const struct session *sb = *b; - int result; + int result = 0; switch (window_tree_sort->field) { case WINDOW_TREE_BY_INDEX: @@ -226,7 +226,7 @@ window_tree_cmp_window(const void *a0, const void *b0) const struct winlink *wlb = *b; struct window *wa = wla->window; struct window *wb = wlb->window; - int result; + int result = 0; switch (window_tree_sort->field) { case WINDOW_TREE_BY_INDEX: -- cgit