From 7aadb53ef020b13658c9a99ecffe554af8755420 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 15 Dec 2011 15:06:25 +0800 Subject: [PATCH] st/egl: fix compiler warnings One is about casting a pointer to integer and the other is about an unused function when HAVE_WAYLAND_BACKEND is not defined. --- src/gallium/state_trackers/egl/common/egl_g3d_image.c | 2 +- src/gallium/state_trackers/egl/x11/native_dri2.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_image.c b/src/gallium/state_trackers/egl/common/egl_g3d_image.c index cf8ec98dbba..c6568d6e7c7 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_image.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.c @@ -248,7 +248,7 @@ egl_g3d_create_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, #ifdef EGL_MESA_drm_image case EGL_DRM_BUFFER_MESA: ptex = egl_g3d_reference_drm_buffer(dpy, - (EGLint) buffer, &gimg->base, attribs); + (EGLint) pointer_to_intptr(buffer), &gimg->base, attribs); break; #endif #ifdef EGL_WL_bind_wayland_display diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c index 9ea3b807be9..5d7d3796e2b 100644 --- a/src/gallium/state_trackers/egl/x11/native_dri2.c +++ b/src/gallium/state_trackers/egl/x11/native_dri2.c @@ -836,6 +836,8 @@ dri2_display_hash_table_compare(void *key1, void *key2) return ((char *) key1 - (char *) key2); } +#ifdef HAVE_WAYLAND_BACKEND + static int dri2_display_authenticate(void *user_data, uint32_t magic) { @@ -845,8 +847,6 @@ dri2_display_authenticate(void *user_data, uint32_t magic) return x11_screen_authenticate(dri2dpy->xscr, magic); } -#ifdef HAVE_WAYLAND_BACKEND - static struct wayland_drm_callbacks wl_drm_callbacks = { dri2_display_authenticate, egl_g3d_wl_drm_helper_reference_buffer, -- 2.30.2