From a54f5e8e00eaede1f6428d33422aecfb7ad3796b Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 14 Mar 2022 22:38:45 +0200 Subject: [PATCH] anv: silence compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6146 Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan/anv_batch_chain.c | 6 +++--- src/intel/vulkan/anv_cmd_buffer.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 5790101fec0..c42b4e79cc7 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -665,7 +665,7 @@ static VkResult anv_cmd_buffer_chain_batch(struct anv_batch *batch, void *_data) { struct anv_cmd_buffer *cmd_buffer = _data; - struct anv_batch_bo *new_bbo; + struct anv_batch_bo *new_bbo = NULL; /* Cap reallocation to chunk. */ uint32_t alloc_size = MIN2(cmd_buffer->total_batch_size, ANV_MAX_CMD_BUFFER_BATCH_SIZE); @@ -837,7 +837,7 @@ anv_cmd_buffer_new_binding_table_block(struct anv_cmd_buffer *cmd_buffer) VkResult anv_cmd_buffer_init_batch_bo_chain(struct anv_cmd_buffer *cmd_buffer) { - struct anv_batch_bo *batch_bo; + struct anv_batch_bo *batch_bo = NULL; VkResult result; list_inithead(&cmd_buffer->batch_bos); @@ -2405,7 +2405,7 @@ anv_queue_submit_simple_batch(struct anv_queue *queue, uint32_t batch_size = align_u32(batch->next - batch->start, 8); - struct anv_bo *batch_bo; + struct anv_bo *batch_bo = NULL; result = anv_bo_pool_alloc(&device->batch_bo_pool, batch_size, &batch_bo); if (result != VK_SUCCESS) return result; diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 78f8728c29a..06820418c1f 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -618,7 +618,7 @@ void anv_CmdBindPipeline( } default: - assert(!"invalid bind point"); + unreachable("invalid bind point"); break; }