[Mesa-dev] [PATCH] vulkan/wsi: fix pointer-integer conversion warnings

Grazvydas Ignotas notasas at gmail.com
Mon Aug 20 21:40:45 UTC 2018


For 32bit build. Trivial.
---
 src/vulkan/wsi/wsi_common_display.c | 4 ++--
 src/vulkan/wsi/wsi_common_x11.c     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c
index e6cba188dfa..1e90bba460c 100644
--- a/src/vulkan/wsi/wsi_common_display.c
+++ b/src/vulkan/wsi/wsi_common_display.c
@@ -1515,11 +1515,11 @@ wsi_register_vblank_event(struct wsi_display_fence *fence,
    for (;;) {
       int ret = drmCrtcQueueSequence(wsi->fd, connector->crtc_id,
                                      flags,
                                      frame_requested,
                                      frame_queued,
-                                     (uint64_t) fence);
+                                     (uintptr_t) fence);
 
       if (!ret)
          return VK_SUCCESS;
 
       if (errno != ENOMEM) {
@@ -2340,11 +2340,11 @@ wsi_get_randr_output_display(VkPhysicalDevice physical_device,
       wsi_display_get_output(wsi_device, connection, (xcb_randr_output_t) output);
 
    if (connector)
       *display = wsi_display_connector_to_handle(connector);
    else
-      *display = NULL;
+      *display = VK_NULL_HANDLE;
    return VK_SUCCESS;
 }
 
 #endif
 
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 7b930884b47..aaa4d1e658e 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -1323,11 +1323,11 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
     * last completion mode, to ensure we don't get into reallocation
     * cycles. If we are starting anew, we set 'COPY', as that is the only
     * mode which provokes reallocation when anything changes, to make
     * sure we have the most optimal allocation.
     */
-   struct x11_swapchain *old_chain = (void *) pCreateInfo->oldSwapchain;
+   struct x11_swapchain *old_chain = (void *)(intptr_t) pCreateInfo->oldSwapchain;
    if (old_chain)
       chain->last_present_mode = old_chain->last_present_mode;
    else
       chain->last_present_mode = XCB_PRESENT_COMPLETE_MODE_COPY;
 
-- 
2.17.1



More information about the mesa-dev mailing list