]> git.neil.brown.name Git - edlib.git/commitdiff
display-xcb - silence "may be uninitialised warning"
authorNeilBrown <neil@brown.name>
Fri, 26 May 2023 10:10:48 +0000 (20:10 +1000)
committerNeilBrown <neil@brown.name>
Fri, 26 May 2023 22:18:43 +0000 (08:18 +1000)
gcc cannot tell that x and y are only used if 'src', and they are
initialised if 'src' is set.  So help it out.

Signed-off-by: NeilBrown <neil@brown.name>
display-x11-xcb.c

index dfeaf5754cdbe707a331202659c37c4d70c3d64a..cff553628fbe888801b418dc95c9ea5131aef2a2 100644 (file)
@@ -566,7 +566,7 @@ DEF_CMD(xcb_clear)
        const char *attr = ci->str;
        struct panes *src = NULL, *dest;
        struct rgb bg;
-       int x, y;
+       int x=0, y=0;
        cairo_rectangle_int_t r;
 
        if (attr) {