From: Eric Engestrom Date: Sun, 28 Oct 2018 13:40:12 +0000 (+0000) Subject: wsi/wayland: fix pointer casting warning on 32bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2e24dd81d338421de63d66b0988fd4f0e72db8e;p=mesa.git wsi/wayland: fix pointer casting warning on 32bit Signed-off-by: Eric Engestrom Reviewed-by: Tapani Pälli --- diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index fac34304044..87fcbae26c4 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -672,6 +672,7 @@ struct wsi_wl_swapchain { struct wsi_wl_image images[0]; }; +WSI_DEFINE_NONDISP_HANDLE_CASTS(wsi_wl_swapchain, VkSwapchainKHR) static struct wsi_image * wsi_wl_swapchain_get_wsi_image(struct wsi_swapchain *wsi_chain, @@ -967,7 +968,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; + WSI_FROM_HANDLE(wsi_wl_swapchain, old_chain, pCreateInfo->oldSwapchain); chain->display = wsi_wl_display_ref(old_chain->display); } else { chain->display = NULL;