anv: silence compiler warnings
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 14 Mar 2022 20:38:45 +0000 (22:38 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 16 Mar 2022 01:02:05 +0000 (01:02 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6146
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15387>

src/intel/vulkan/anv_batch_chain.c
src/intel/vulkan/anv_cmd_buffer.c

index 5790101..c42b4e7 100644 (file)
@@ -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;
index 78f8728..0682041 100644 (file)
@@ -618,7 +618,7 @@ void anv_CmdBindPipeline(
    }
 
    default:
-      assert(!"invalid bind point");
+      unreachable("invalid bind point");
       break;
    }