From 1b15bc0f1dfa75e4d2cf2a5c08f02ee0356736d2 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 17 May 2021 17:34:35 +0100 Subject: [PATCH] clang build warning fixes proposal --- include/vk_mem_alloc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 8873ecc..3c8882e 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -4172,7 +4172,7 @@ static void vma_aligned_free(void* ptr) _aligned_free(ptr); } #else -static void vma_aligned_free(void* ptr) +static void vma_aligned_free(void* VMA_NULLABLE ptr) { free(ptr); } @@ -4247,15 +4247,15 @@ static void vma_aligned_free(void* ptr) // Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString. #if VMA_STATS_STRING_ENABLED - static inline void VmaUint32ToStr(char* outStr, size_t strLen, uint32_t num) + static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num) { snprintf(outStr, strLen, "%u", static_cast(num)); } - static inline void VmaUint64ToStr(char* outStr, size_t strLen, uint64_t num) + static inline void VmaUint64ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint64_t num) { snprintf(outStr, strLen, "%llu", static_cast(num)); } - static inline void VmaPtrToStr(char* outStr, size_t strLen, const void* ptr) + static inline void VmaPtrToStr(char* VMA_NOT_NULL outStr, size_t strLen, const void* ptr) { snprintf(outStr, strLen, "%p", ptr); }