winex11.drv: only declare X11DRV_DIB_QueryXShm if XShm is supported

Austin English austinenglish at gmail.com
Thu Oct 27 13:25:26 CDT 2011


It's only called by X11DRV_CreateDIBSection inside of #ifdef HAVE_LIBXXSHM.

Fixes:
dib.c:3854:12: warning: 'X11DRV_DIB_QueryXShm' defined but not used

when --without-xshm is used.

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c
index b70dcfa..7e30530 100644
--- a/dlls/winex11.drv/dib.c
+++ b/dlls/winex11.drv/dib.c
@@ -3849,7 +3849,6 @@ static XImage *X11DRV_XShmCreateImage( int width, int height, int bpp,
     }
     return image;
 }
-#endif /* HAVE_LIBXXSHM */
 
 static Bool X11DRV_DIB_QueryXShm( Bool *pixmaps )
 {
@@ -3858,17 +3857,16 @@ static Bool X11DRV_DIB_QueryXShm( Bool *pixmaps )
 
     if (!initialized)
     {
-#ifdef HAVE_LIBXXSHM
         int major, minor;
 
         have_xshm = XShmQueryVersion( gdi_display, &major, &minor, &have_xshm_pixmaps );
-#endif
         initialized = TRUE;
     }
 
     *pixmaps = have_xshm_pixmaps;
     return have_xshm;
 }
+#endif /* HAVE_LIBXXSHM */
 
 /***********************************************************************
  *           X11DRV_CreateDIBSection   (X11DRV.@)


More information about the wine-patches mailing list