From e63f3e394c9dd4e38d693b25d7b972dd8f517a7c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 1 Jul 2021 13:19:18 +0300 Subject: [PATCH] - fixed format specifier compilation warnings src/common/engine/serializer_internal.h:241: warning: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') [-Wformat] src/common/engine/serializer_internal.h:250: warning: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') [-Wformat] src/common/rendering/vulkan/system/vk_device.cpp:364:29: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat] src/common/rendering/vulkan/system/vk_framebuffer.cpp:701:57: warning: format specifies type 'unsigned long long' but the argument has type 'VkDeviceSize' (aka 'unsigned long') [-Wformat] --- src/common/engine/serializer_internal.h | 4 ++-- src/common/rendering/vulkan/system/vk_device.cpp | 3 ++- src/common/rendering/vulkan/system/vk_framebuffer.cpp | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/common/engine/serializer_internal.h b/src/common/engine/serializer_internal.h index 161d2ebdf7..e05d5785c5 100644 --- a/src/common/engine/serializer_internal.h +++ b/src/common/engine/serializer_internal.h @@ -238,7 +238,7 @@ FSerializer &SerializePointer(FSerializer &arc, const char *key, T *&value, T ** vv = value - base; if (vv < 0 || vv >= count) { - Printf("Trying to serialize out-of-bounds array value with key '%s', index = %lli, size = %lli\n", key, vv, count); + Printf("Trying to serialize out-of-bounds array value with key '%s', index = %" PRId64 ", size = %" PRId64 "\n", key, vv, count); vv = -1; } } @@ -247,7 +247,7 @@ FSerializer &SerializePointer(FSerializer &arc, const char *key, T *&value, T ** value = nullptr; else if (vv < 0 || vv >= count) { - Printf("Trying to serialize out-of-bounds array value with key '%s', index = %lli, size = %lli\n", key, vv, count); + Printf("Trying to serialize out-of-bounds array value with key '%s', index = %" PRId64 ", size = %" PRId64 "\n", key, vv, count); value = nullptr; } else diff --git a/src/common/rendering/vulkan/system/vk_device.cpp b/src/common/rendering/vulkan/system/vk_device.cpp index 2e7ca9aad7..ae2b9900f5 100644 --- a/src/common/rendering/vulkan/system/vk_device.cpp +++ b/src/common/rendering/vulkan/system/vk_device.cpp @@ -27,6 +27,7 @@ #undef min #endif +#include #include #include #include @@ -361,7 +362,7 @@ VkBool32 VulkanDevice::DebugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT mess if (callbackData->pObjects[i].pObjectName) { FString hexname; - hexname.Format("0x%llx", callbackData->pObjects[i].objectHandle); + hexname.Format("0x%" PRIx64, callbackData->pObjects[i].objectHandle); msg.Substitute(hexname.GetChars(), callbackData->pObjects[i].pObjectName); } } diff --git a/src/common/rendering/vulkan/system/vk_framebuffer.cpp b/src/common/rendering/vulkan/system/vk_framebuffer.cpp index 9b83b6e26f..5bce012243 100644 --- a/src/common/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/common/rendering/vulkan/system/vk_framebuffer.cpp @@ -22,6 +22,8 @@ #include "volk/volk.h" +#include + #include "v_video.h" #include "m_png.h" #include "templates.h" @@ -698,7 +700,7 @@ void VulkanFrameBuffer::PrintStartupLog() const auto &limits = props.limits; Printf("Max. texture size: %d\n", limits.maxImageDimension2D); Printf("Max. uniform buffer range: %d\n", limits.maxUniformBufferRange); - Printf("Min. uniform buffer offset alignment: %llu\n", limits.minUniformBufferOffsetAlignment); + Printf("Min. uniform buffer offset alignment: %" PRIu64 "\n", limits.minUniformBufferOffsetAlignment); } void VulkanFrameBuffer::CreateFanToTrisIndexBuffer()