diff options
author | Eric Anholt <[email protected]> | 2019-12-16 19:58:39 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2020-01-28 12:30:48 -0800 |
commit | 05e3ccd8a114df741ec493c977374deda3c6e693 (patch) | |
tree | 1807c4bcf69630a3ba52a5e872417dd8f606707d /src/vulkan/wsi | |
parent | 71c6208200921cc92e6f36dfb55e437d58cbaee2 (diff) |
vulkan/wsi: Fix compiler warning when no WSI platforms are enabled.
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3539>
Diffstat (limited to 'src/vulkan/wsi')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index dfc90b5900d..0adf54eab8f 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -42,7 +42,7 @@ wsi_device_init(struct wsi_device *wsi, const struct driOptionCache *dri_options) { const char *present_mode; - VkResult result; + UNUSED VkResult result; memset(wsi, 0, sizeof(*wsi)); @@ -145,10 +145,13 @@ wsi_device_init(struct wsi_device *wsi, } return VK_SUCCESS; - +#if defined(VK_USE_PLATFORM_XCB_KHR) || \ + defined(VK_USE_PLATFORM_WAYLAND_KHR) || \ + defined(VK_USE_PLATFORM_DISPLAY_KHR) fail: wsi_device_finish(wsi, alloc); return result; +#endif } void |