Mesa (master): vulkan/wsi: fix pointer-integer conversion warnings

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 22 21:35:06 UTC 2018


Module: Mesa
Branch: master
Commit: 0076ea92a9d76fc6cae1a83fb3a8c1c30d0fcbae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0076ea92a9d76fc6cae1a83fb3a8c1c30d0fcbae

Author: Grazvydas Ignotas <notasas at gmail.com>
Date:   Tue Aug 21 00:36:58 2018 +0300

vulkan/wsi: fix pointer-integer conversion warnings

For 32bit build. Trivial.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 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 e6cba188df..1e90bba460 100644
--- a/src/vulkan/wsi/wsi_common_display.c
+++ b/src/vulkan/wsi/wsi_common_display.c
@@ -1517,7 +1517,7 @@ wsi_register_vblank_event(struct wsi_display_fence *fence,
                                      flags,
                                      frame_requested,
                                      frame_queued,
-                                     (uint64_t) fence);
+                                     (uintptr_t) fence);
 
       if (!ret)
          return VK_SUCCESS;
@@ -2342,7 +2342,7 @@ wsi_get_randr_output_display(VkPhysicalDevice physical_device,
    if (connector)
       *display = wsi_display_connector_to_handle(connector);
    else
-      *display = NULL;
+      *display = VK_NULL_HANDLE;
    return VK_SUCCESS;
 }
 
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 7b930884b4..aaa4d1e658 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -1325,7 +1325,7 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
     * 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




More information about the mesa-commit mailing list