Mesa (master): radv: Squelch possibly-undefined warning
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Feb 19 00:13:35 UTC 2020
Module: Mesa
Branch: master
Commit: 13a276ed3bad09033c00f0a08fcaad803c8a2173
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=13a276ed3bad09033c00f0a08fcaad803c8a2173
Author: Eric Anholt <eric at anholt.net>
Date: Mon Dec 16 20:00:00 2019 -0800
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 <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3867>
---
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, "");
More information about the mesa-commit
mailing list