[Mesa-dev] [PATCH 16/17] anv: Silence warning about heap_size.

Eric Anholt eric at anholt.net
Sat Feb 10 16:33:09 UTC 2018


We only get VK_SUCCESS if it was initialized, but apparently my compiler
doesn't track that far.

Cc: Jason Ekstrand <jason.ekstrand at intel.com>
---
 src/intel/vulkan/anv_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 86c1bdc1d51d..ae3a29779c94 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -109,7 +109,7 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
    device->supports_48bit_addresses =
       (device->info.gen >= 8) && anv_gem_supports_48b_addresses(fd);
 
-   uint64_t heap_size;
+   uint64_t heap_size = 0;
    VkResult result = anv_compute_heap_size(fd, &heap_size);
    if (result != VK_SUCCESS)
       return result;
-- 
2.15.0



More information about the mesa-dev mailing list