Merge pull request #167 from devnexen/clang_build_warning_fixes

clang build warning fixes proposal
This commit is contained in:
Adam Sawicki 2021-05-18 12:21:34 +02:00 committed by GitHub
commit cc47fcf867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4172,7 +4172,7 @@ static void vma_aligned_free(void* ptr)
_aligned_free(ptr); _aligned_free(ptr);
} }
#else #else
static void vma_aligned_free(void* ptr) static void vma_aligned_free(void* VMA_NULLABLE ptr)
{ {
free(ptr); free(ptr);
} }
@ -4247,15 +4247,15 @@ static void vma_aligned_free(void* ptr)
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString. // Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
#if VMA_STATS_STRING_ENABLED #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<unsigned int>(num)); snprintf(outStr, strLen, "%u", static_cast<unsigned int>(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<unsigned long long>(num)); snprintf(outStr, strLen, "%llu", static_cast<unsigned long long>(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); snprintf(outStr, strLen, "%p", ptr);
} }