From: Kristian Høgsberg Kristensen Date: Sun, 14 Feb 2016 21:20:06 +0000 (-0800) Subject: anv: Fix misc simple warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d72d7b12d623c86539c807ea07f2e0bdc32836d;p=mesa.git anv: Fix misc simple warnings --- diff --git a/src/vulkan/anv_allocator.c b/src/vulkan/anv_allocator.c index 4be149ea695..1f858bbdff4 100644 --- a/src/vulkan/anv_allocator.c +++ b/src/vulkan/anv_allocator.c @@ -712,7 +712,7 @@ anv_state_stream_init(struct anv_state_stream *stream, void anv_state_stream_finish(struct anv_state_stream *stream) { - const uint32_t block_size = stream->block_pool->block_size; + VG(const uint32_t block_size = stream->block_pool->block_size); struct anv_state_stream_block *next = stream->block; while (next != NULL) { diff --git a/src/vulkan/anv_batch_chain.c b/src/vulkan/anv_batch_chain.c index 13a3faee233..79e55197e85 100644 --- a/src/vulkan/anv_batch_chain.c +++ b/src/vulkan/anv_batch_chain.c @@ -355,7 +355,7 @@ anv_batch_bo_list_clone(const struct list_head *list, struct anv_batch_bo *prev_bbo = NULL; list_for_each_entry(struct anv_batch_bo, bbo, list, link) { - struct anv_batch_bo *new_bbo; + struct anv_batch_bo *new_bbo = NULL; result = anv_batch_bo_clone(cmd_buffer, bbo, &new_bbo); if (result != VK_SUCCESS) break; diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index e2efaafa25d..a1671d931d5 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -854,6 +854,10 @@ VkResult anv_CreateDevice( case 9: result = gen9_init_device_state(device); break; + default: + /* Shouldn't get here as we don't create physical devices for any other + * gens. */ + unreachable("unhandled gen"); } if (result != VK_SUCCESS) goto fail_fd; diff --git a/src/vulkan/anv_query.c b/src/vulkan/anv_query.c index 5b052341e0c..e45b519c0f3 100644 --- a/src/vulkan/anv_query.c +++ b/src/vulkan/anv_query.c @@ -133,14 +133,13 @@ VkResult anv_GetQueryPoolResults( break; } case VK_QUERY_TYPE_PIPELINE_STATISTICS: - /* Not yet implemented */ - break; + unreachable("pipeline stats not supported"); case VK_QUERY_TYPE_TIMESTAMP: { result = slot[firstQuery + i].begin; break; } default: - assert(!"Invalid query type"); + unreachable("invalid pool type"); } if (flags & VK_QUERY_RESULT_64_BIT) {