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

Jose Fonseca jfonseca at vmware.com
Sat Feb 18 04:22:17 PST 2012


It's ok like this. But I think it would be nice to move this function  inside the existing #ifdef HAVE_WAYLAND_BACKEND ... #endif, where it is used, to keep all related wayland code close.

Jose

----- Original Message -----
> 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
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list