diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-28 20:47:50 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-28 20:47:50 +0200 |
commit | e5857bd6c79e9201d8f49ac335b2da9142afc39c (patch) | |
tree | b8ed4d5aa4c18f7351b374b2b10c593f68348be1 /drivers | |
parent | 0dd308cedd7a8ddd20e93dabe32aef4a9340d5d5 (diff) | |
parent | 85fe6ecc32ace7fcf119d9b492e37cd627ae7e4d (diff) |
Merge pull request #66548 from akien-mga/msvc-warnings-c4701-c4703
Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable used
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 4 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 53e9146f85..bfe34399ec 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -4828,7 +4828,7 @@ Vector<uint8_t> RenderingDeviceVulkan::shader_compile_binary_from_spirv(const Ve for (uint32_t j = 0; j < binding_count; j++) { const SpvReflectDescriptorBinding &binding = *bindings[j]; - RenderingDeviceVulkanShaderBinaryDataBinding info; + RenderingDeviceVulkanShaderBinaryDataBinding info{}; bool need_array_dimensions = false; bool need_block_size = false; @@ -4979,7 +4979,7 @@ Vector<uint8_t> RenderingDeviceVulkan::shader_compile_binary_from_spirv(const Ve for (uint32_t j = 0; j < sc_count; j++) { int32_t existing = -1; - RenderingDeviceVulkanShaderBinarySpecializationConstant sconst; + RenderingDeviceVulkanShaderBinarySpecializationConstant sconst{}; SpvReflectSpecializationConstant *spc = spec_constants[j]; sconst.constant_id = spc->constant_id; diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index 99ef57abae..98adc0f16e 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -608,10 +608,10 @@ Error VulkanContext::_check_capabilities() { device_properties_func = (PFN_vkGetPhysicalDeviceProperties2)vkGetInstanceProcAddr(inst, "vkGetPhysicalDeviceProperties2KHR"); } if (device_properties_func != nullptr) { - VkPhysicalDeviceFragmentShadingRatePropertiesKHR vrsProperties; - VkPhysicalDeviceMultiviewProperties multiviewProperties; - VkPhysicalDeviceSubgroupProperties subgroupProperties; - VkPhysicalDeviceProperties2 physicalDeviceProperties; + VkPhysicalDeviceFragmentShadingRatePropertiesKHR vrsProperties{}; + VkPhysicalDeviceMultiviewProperties multiviewProperties{}; + VkPhysicalDeviceSubgroupProperties subgroupProperties{}; + VkPhysicalDeviceProperties2 physicalDeviceProperties{}; void *nextptr = nullptr; subgroupProperties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES; |