Thomas Adam
unread,May 12, 2019, 1:57:44 PM5/12/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tmux-...@googlegroups.com, Thomas Adam
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