From: Quentin Glidic <[email protected]>

clients/terminal.c: In function 'recompute_selection':
clients/terminal.c:2676:22: warning: 'data' may be used uninitialized in
this function [-Wmaybe-uninitialized]
   if (col > 0 && data[col - 1].ch == 0)
                         ^

Warning produced by GCC 5.3 and 6.1, with -Og.

Signed-off-by: Quentin Glidic <[email protected]>
---

I am not 100% sure about this one, should we check the value?

 clients/terminal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clients/terminal.c b/clients/terminal.c
index 6257cb7..100ef3c 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2596,7 +2596,7 @@ recompute_selection(struct terminal *terminal)
        int side_margin, top_margin;
        int start_x, end_x;
        int cw, ch;
-       union utf8_char *data;
+       union utf8_char *data = NULL;
 
        cw = terminal->average_width;
        ch = terminal->extents.height;
-- 
2.9.0

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to