kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=1618ea2ca85b0c1e0c4330c9ddf1e897de63578c

commit 1618ea2ca85b0c1e0c4330c9ddf1e897de63578c
Author: Kim Woelders <k...@woelders.dk>
Date:   Fri Aug 13 10:51:55 2021 +0200

    x.c: Fix LTO warnings
---
 src/x.c | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/src/x.c b/src/x.c
index d4535e6a..024c6ed5 100644
--- a/src/x.c
+++ b/src/x.c
@@ -817,6 +817,20 @@ EXGetGeometry(EX_Drawable draw, EX_Window * root_return, 
int *x, int *y,
 #if 0                          /* Debug */
        Eprintf("%s win=%#x, error %d\n", __func__, draw, ok);
 #endif
+       if (root_return)
+          *root_return = NoXID;
+       if (x)
+          *x = 0;
+       if (y)
+          *y = 0;
+       if (w)
+          *w = 0;
+       if (h)
+          *h = 0;
+       if (bw)
+          *bw = 0;
+       if (depth)
+          *depth = 0;
        return 0;
      }
 
@@ -843,8 +857,27 @@ EGetGeometry(Win win, EX_Window * root_return, int *x, int 
*y,
             int *w, int *h, int *bw, int *depth)
 {
    if (!win)
-      return 0;
+     {
+       Eprintf("%s win=null\n", __func__);
+       if (root_return)
+          *root_return = NoXID;
+       if (x)
+          *x = 0;
+       if (y)
+          *y = 0;
+       if (w)
+          *w = 0;
+       if (h)
+          *h = 0;
+       if (bw)
+          *bw = 0;
+       if (depth)
+          *depth = 0;
+       return 0;
+     }
 
+   if (root_return)
+      *root_return = WinGetXwin(VROOT);
    if (x)
       *x = win->x;
    if (y)
@@ -857,8 +890,6 @@ EGetGeometry(Win win, EX_Window * root_return, int *x, int 
*y,
       *bw = 0;
    if (depth)
       *depth = win->depth;
-   if (root_return)
-      *root_return = WinGetXwin(VROOT);
 
    return 1;
 }

-- 


Reply via email to