For mode_tree_display_menu() there's two conditions at the same
indentation of an else statement, without surrounding braces. Clang
blows a gasket, and we should rightly fix it.
---
mode-tree.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mode-tree.c b/mode-tree.c
index eb642826..1add48e2 100644
--- a/mode-tree.c
+++ b/mode-tree.c
@@ -808,7 +808,7 @@ static void
mode_tree_display_menu(struct mode_tree_data *mtd, struct client *c, u_int x,
u_int y, int outside)
{
- struct mode_tree_item *mti;
+ struct mode_tree_item *mti = NULL;
struct menu *menu;
struct mode_tree_menu *mtm;
const char *s;
@@ -817,9 +817,10 @@ mode_tree_display_menu(struct mode_tree_data *mtd, struct
client *c, u_int x,
if (mtd->offset + y > mtd->line_size - 1)
line = mtd->current;
- else
+ else {
line = mtd->offset + y;
mti = mtd->line_list[line].item;
+ }
if (!outside) {
s = mtd->menu;
--
2.20.1
--
You received this message because you are subscribed to the Google Groups
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/tmux-users/20190512175735.10869-1-thomas%40xteddy.org.
For more options, visit https://groups.google.com/d/optout.