From 48889fc68dbfe2f45396be29c55615b1f300b47f Mon Sep 17 00:00:00 2001 From: "Thomas H.P. Andersen" Date: Sat, 8 Jan 2022 20:45:45 +0100 Subject: [PATCH] vulkan: avoid warning about unused function VK_DEFINE_NONDISP_HANDLE_CASTS defines two functions. In some cases only one or the other is used. Marking them both unused here to avoid warnings. Fixes a clang warning about unused static inlined functions. Reviewed-by: Eric Engestrom Reviewed-by: Yonggang Luo Part-of: --- src/vulkan/runtime/vk_object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vulkan/runtime/vk_object.h b/src/vulkan/runtime/vk_object.h index 79157f241bb..6e346c2c068 100644 --- a/src/vulkan/runtime/vk_object.h +++ b/src/vulkan/runtime/vk_object.h @@ -169,7 +169,7 @@ vk_object_base_from_u64_handle(uint64_t handle, VkObjectType obj_type) * VK_OBJECT_TYPE_IMAGE */ #define VK_DEFINE_NONDISP_HANDLE_CASTS(__driver_type, __base, __VkType, __VK_TYPE) \ - static inline struct __driver_type * \ + UNUSED static inline struct __driver_type * \ __driver_type ## _from_handle(__VkType _handle) \ { \ struct vk_object_base *base = \ @@ -179,7 +179,7 @@ vk_object_base_from_u64_handle(uint64_t handle, VkObjectType obj_type) return (struct __driver_type *)base; \ } \ \ - static inline __VkType \ + UNUSED static inline __VkType \ __driver_type ## _to_handle(struct __driver_type *_obj) \ { \ vk_object_base_assert_valid(&_obj->__base, __VK_TYPE); \