radv: Fix compiler warning about uninitialized 'set'
authorEric Anholt <eric@anholt.net>
Sat, 10 Feb 2018 11:06:45 +0000 (11:06 +0000)
committerEric Anholt <eric@anholt.net>
Mon, 12 Feb 2018 20:48:47 +0000 (20:48 +0000)
The compiler doesn't figure out that we only get result == VK_SUCCESS if
set got initialized.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_descriptor_set.c

index bbabfa9b2755c21a54e4bb6062a63fe170f384fc..056a5644dfa06dbdf6fe2e18032149aa1520186c 100644 (file)
@@ -518,7 +518,7 @@ VkResult radv_AllocateDescriptorSets(
 
        VkResult result = VK_SUCCESS;
        uint32_t i;
-       struct radv_descriptor_set *set;
+       struct radv_descriptor_set *set = NULL;
 
        /* allocate a set of buffers for each shader to contain descriptors */
        for (i = 0; i < pAllocateInfo->descriptorSetCount; i++) {