[Mesa-dev] [PATCH] st/egl: Define drm_display_authenticate only with HAVE_WAYLAND_BACKEND.

Vinson Lee vlee at freedesktop.org
Sat Feb 18 00:03:08 PST 2012


Fixes this GCC warning.
native_drm.c:153:1: warning: ‘drm_display_authenticate’ defined but not
used [-Wunused-function]

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/gallium/state_trackers/egl/drm/native_drm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/egl/drm/native_drm.c b/src/gallium/state_trackers/egl/drm/native_drm.c
index c013769..3652581 100644
--- a/src/gallium/state_trackers/egl/drm/native_drm.c
+++ b/src/gallium/state_trackers/egl/drm/native_drm.c
@@ -149,6 +149,7 @@ static struct native_display_buffer drm_display_buffer = {
    drm_display_export_native_buffer
 };
 
+#ifdef HAVE_WAYLAND_BACKEND
 static int
 drm_display_authenticate(void *user_data, uint32_t magic)
 {
@@ -157,6 +158,7 @@ drm_display_authenticate(void *user_data, uint32_t magic)
 
    return drmAuthMagic(drmdpy->fd, magic);
 }
+#endif
 
 static char *
 drm_get_device_name(int fd)
-- 
1.7.9



More information about the mesa-dev mailing list