[Mesa-dev] [PATCH mesa 4/4] vulkan/wsi: fix pointer casting warning on 32bit

Jason Ekstrand jason at jlekstrand.net
Sun Oct 28 22:29:34 UTC 2018


On October 28, 2018 08:45:30 Eric Engestrom <eric.engestrom at intel.com> wrote:

> Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
> ---
> src/vulkan/wsi/wsi_common_wayland.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> diff --git a/src/vulkan/wsi/wsi_common_wayland.c 
> b/src/vulkan/wsi/wsi_common_wayland.c
> index e9cc22ec60372e486e8e..c3cb066bd6dfedb6a363 100644
> --- a/src/vulkan/wsi/wsi_common_wayland.c
> +++ b/src/vulkan/wsi/wsi_common_wayland.c
> @@ -959,7 +959,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase 
> *icd_surface,
>       /* If we have an oldSwapchain parameter, copy the display struct over
>        * from the old one so we don't have to fully re-initialize it.
>        */
> -      struct wsi_wl_swapchain *old_chain = (void *)pCreateInfo->oldSwapchain;
> +      struct wsi_wl_swapchain *old_chain = (void 
> *)(uintptr_t)pCreateInfo->oldSwapchain;

This is exactly what WSI_FROM_HANDLE is for.

--Jason

>       chain->display = wsi_wl_display_ref(old_chain->display);
>    } else {
>       chain->display = NULL;
> --
> Cheers,
>  Eric
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev





More information about the mesa-dev mailing list