From: Eric Anholt Date: Tue, 17 Dec 2019 04:00:00 +0000 (-0800) Subject: radv: Squelch possibly-undefined warning X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=13a276ed3bad09033c00f0a08fcaad803c8a2173;p=mesa.git radv: Squelch possibly-undefined warning The same condition is used in the def as in the use, but gcc wasn't figuring it out. Reviewed-by: Samuel Pitoiset Part-of: --- diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 422ffa17699..49c91aeb04e 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -4188,7 +4188,7 @@ LLVMModuleRef ac_translate_nir_to_llvm(struct ac_llvm_compiler *ac_llvm, ac_setup_rings(&ctx); - LLVMBasicBlockRef merge_block; + LLVMBasicBlockRef merge_block = NULL; if (shader_count >= 2 || is_ngg) { LLVMValueRef fn = LLVMGetBasicBlockParent(LLVMGetInsertBlock(ctx.ac.builder)); LLVMBasicBlockRef then_block = LLVMAppendBasicBlockInContext(ctx.ac.context, fn, "");