egl/dri2: Mark potentially unused 'display' variable with MAYBE_UNUSED
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 18 Apr 2019 18:30:22 +0000 (11:30 -0700)
committerKristian H. Kristensen <hoegsberg@gmail.com>
Fri, 19 Apr 2019 16:17:37 +0000 (16:17 +0000)
Sometimes there is no X11 platform.

Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/egl_dri2.c

index 9d8a4d9cf7178ce866a7b520a0d756497f40a986..d584bccdebe72c033edd86038247464aa0f56592 100644 (file)
@@ -115,7 +115,7 @@ static GLboolean
 dri_is_thread_safe(void *loaderPrivate)
 {
    struct dri2_egl_surface *dri2_surf = loaderPrivate;
-   _EGLDisplay *display =  dri2_surf->base.Resource.Display;
+   MAYBE_UNUSED _EGLDisplay *display =  dri2_surf->base.Resource.Display;
 
 #ifdef HAVE_X11_PLATFORM
    Display *xdpy = (Display*)display->PlatformDisplay;