[mutter] xwayland: Fix XIOErrorExitHandler warning



commit 79d4d7a4ff25a83fa036c0aeb22105d9b8c4b3fa
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Dec 2 16:29:06 2020 +0100

    xwayland: Fix XIOErrorExitHandler warning
    
    The XIOErrorExitHandler expects (Display *, void *) whereas mutter uses
    (Display *, MetaX11Display *).
    
    That causes a warning at build time:
    
      warning: passing argument 2 of ‘XSetIOErrorExitHandler’ from
               incompatible pointer type [-Wincompatible-pointer-types]
        813 |   XSetIOErrorExitHandler (xdisplay, x_io_error_exit, display);
    
    Actually, the MetaX11Display is not even used, so we can just use the
    expected API and ignore the value.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1621>

 src/wayland/meta-xwayland.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index f3dd192605..f007f21bae 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -336,8 +336,8 @@ x_io_error (Display *display)
 
 #ifdef HAVE_XSETIOERROREXITHANDLER
 static void
-x_io_error_exit (Display        *display,
-                 MetaX11Display *x11_display)
+x_io_error_exit (Display *display,
+                 void    *data)
 {
   MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
   MetaXWaylandManager *manager = &compositor->xwayland_manager;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]