From 13a276ed3bad09033c00f0a08fcaad803c8a2173 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 16 Dec 2019 20:00:00 -0800 Subject: [PATCH] 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: --- src/amd/vulkan/radv_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, ""); -- 2.30.2