egl/x11: resolve "initialization from incompatible pointer type" warning
With earlier commit we've moved a few functions and changing the
argument type from _EGLDisplay * to struct dri2_egl_display *.
The latter is effectively a wrapper around the former, thus
functionality was preserved, although GCC rightfully warned us about the
misuse.
Add a simple wrapper that casts and propagates the correct type.
Fixes: 9bbf3737f9
("egl/x11: authenticate before doing chipset id
ioctls")
Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org>
Reported-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:

committed by
Emil Velikov

parent
a92910ae37
commit
b8e59292e6
@@ -543,7 +543,7 @@ dri2_x11_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dri2_x11_authenticate(struct dri2_egl_display *dri2_dpy, uint32_t id)
|
dri2_x11_do_authenticate(struct dri2_egl_display *dri2_dpy, uint32_t id)
|
||||||
{
|
{
|
||||||
xcb_dri2_authenticate_reply_t *authenticate;
|
xcb_dri2_authenticate_reply_t *authenticate;
|
||||||
xcb_dri2_authenticate_cookie_t authenticate_cookie;
|
xcb_dri2_authenticate_cookie_t authenticate_cookie;
|
||||||
@@ -583,7 +583,7 @@ dri2_x11_local_authenticate(struct dri2_egl_display *dri2_dpy)
|
|||||||
return EGL_FALSE;
|
return EGL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dri2_x11_authenticate(dri2_dpy, magic) < 0) {
|
if (dri2_x11_do_authenticate(dri2_dpy, magic) < 0) {
|
||||||
_eglLog(_EGL_WARNING, "DRI2: failed to authenticate");
|
_eglLog(_EGL_WARNING, "DRI2: failed to authenticate");
|
||||||
return EGL_FALSE;
|
return EGL_FALSE;
|
||||||
}
|
}
|
||||||
@@ -712,6 +712,14 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
|
|||||||
return EGL_TRUE;
|
return EGL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)
|
||||||
|
{
|
||||||
|
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
|
||||||
|
|
||||||
|
return dri2_x11_do_authenticate(dri2_dpy, id);
|
||||||
|
}
|
||||||
|
|
||||||
static EGLBoolean
|
static EGLBoolean
|
||||||
dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
|
dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
|
||||||
_EGLDisplay *disp, bool supports_preserved)
|
_EGLDisplay *disp, bool supports_preserved)
|
||||||
|
Reference in New Issue
Block a user