diff options
author | Grazvydas Ignotas <[email protected]> | 2017-08-27 22:54:56 +0300 |
---|---|---|
committer | Grazvydas Ignotas <[email protected]> | 2017-08-29 01:16:58 +0300 |
commit | 2b4e31bc9bb76e35fd700133b89bb56909f63025 (patch) | |
tree | 8406da9ae75c2fc512d47f81322a52afe7842bae /src | |
parent | 77803748336713854a4ade192253c0ba01c49047 (diff) |
ac/nir: silence maybe-uninitialized warnings
These are likely false positives, but are also annoying because they
show up on every "make install", which causes ac_nir_to_llvm to be
rebuilt here. Initializing those variables to NULL should be harmless
even when unnecessary.
Signed-off-by: Grazvydas Ignotas <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 664d83bd2ea..823ea428927 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -1334,7 +1334,7 @@ static LLVMValueRef emit_f2f16(struct nir_to_llvm_context *ctx, LLVMValueRef src0) { LLVMValueRef result; - LLVMValueRef cond; + LLVMValueRef cond = NULL; src0 = to_float(&ctx->ac, src0); result = LLVMBuildFPTrunc(ctx->builder, src0, ctx->f16, ""); @@ -2054,7 +2054,7 @@ static LLVMValueRef radv_lower_gather4_integer(struct ac_llvm_context *ctx, enum glsl_base_type stype = glsl_get_sampler_result_type(instr->texture->var->type); LLVMValueRef coord = args->addr; LLVMValueRef half_texel[2]; - LLVMValueRef compare_cube_wa; + LLVMValueRef compare_cube_wa = NULL; LLVMValueRef result; int c; unsigned coord_vgpr_index = (unsigned)args->offset + (unsigned)args->compare; @@ -2780,7 +2780,8 @@ static LLVMValueRef load_tcs_output(struct nir_to_llvm_context *ctx, nir_intrinsic_instr *instr) { - LLVMValueRef dw_addr, stride; + LLVMValueRef dw_addr; + LLVMValueRef stride = NULL; LLVMValueRef value[4], result; LLVMValueRef vertex_index = NULL; LLVMValueRef indir_index = NULL; @@ -2819,7 +2820,8 @@ store_tcs_output(struct nir_to_llvm_context *ctx, LLVMValueRef src, unsigned writemask) { - LLVMValueRef stride, dw_addr; + LLVMValueRef dw_addr; + LLVMValueRef stride = NULL; LLVMValueRef buf_addr = NULL; LLVMValueRef vertex_index = NULL; LLVMValueRef indir_index = NULL; @@ -3819,8 +3821,9 @@ static LLVMValueRef visit_interp(struct nir_to_llvm_context *ctx, LLVMValueRef interp_param, attr_number; unsigned location; unsigned chan; - LLVMValueRef src_c0, src_c1; - LLVMValueRef src0; + LLVMValueRef src_c0 = NULL; + LLVMValueRef src_c1 = NULL; + LLVMValueRef src0 = NULL; int input_index = instr->variables[0]->var->data.location - VARYING_SLOT_VAR0; switch (instr->intrinsic) { case nir_intrinsic_interp_var_at_centroid: |