On Friday, 2017-05-05 12:27:03 -0700, Chad Versace wrote:
> main/egldisplay.c: In function '_eglParseX11DisplayAttribList':
> main/egldisplay.c:491:38: warning: cast to pointer from integer of different 
> size [-Wint-to-pointer-cast]
>           display->Options.Platform = (void *)value;
> 
> The fix: cast to uinptr_t before void*.
>                                       ^
> Fixes: ddb99127 egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute
> Cc: Adam Jackson <a...@redhat.com>

Reviewed-by: Eric Engestrom <e...@engestrom.ch>

> ---
>  src/egl/main/egldisplay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
> index b047a5de42..56f802b1aa 100644
> --- a/src/egl/main/egldisplay.c
> +++ b/src/egl/main/egldisplay.c
> @@ -488,7 +488,7 @@ _eglParseX11DisplayAttribList(_EGLDisplay *display, const 
> EGLint *attrib_list)
>         * EGL_PLATFORM_X11_SCREEN_EXT, which is optional.
>         */
>        if (attrib == EGL_PLATFORM_X11_SCREEN_EXT) {
> -         display->Options.Platform = (void *)value;
> +         display->Options.Platform = (void *)(uintptr_t)value;
>        } else {
>           _eglError(EGL_BAD_ATTRIBUTE, "eglGetPlatformDisplay");
>           return EGL_FALSE;
> -- 
> 2.12.0
> 
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to