radeonsi: fix warning: ‘ret’ may be used uninitialized
authorMarek Olšák <marek.olsak@amd.com>
Mon, 22 Jul 2019 19:59:49 +0000 (15:59 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 23 Jul 2019 00:57:44 +0000 (20:57 -0400)
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/radeonsi/si_shader.c

index 6fd7a56dbcda712a10ebaa359071b0183ac63394..679fa4edabd3281ed84028b0ace7c0c9388a3ed1 100644 (file)
@@ -6771,7 +6771,7 @@ static void si_build_wrapper_function(struct si_shader_context *ctx,
        initial_num_out_sgpr = num_out_sgpr;
 
        /* Now chain the parts. */
-       LLVMValueRef ret;
+       LLVMValueRef ret = NULL;
        for (unsigned part = 0; part < num_parts; ++part) {
                LLVMValueRef in[48];
                LLVMTypeRef ret_type;