Mesa (master): ac: Fix a compiler warning for possibly undefined "name"

Eric Anholt anholt at kemper.freedesktop.org
Mon Oct 23 17:15:53 UTC 2017


Module: Mesa
Branch: master
Commit: 34c04c734f6e6b59f11e6cde9cc9038f3335cc29
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=34c04c734f6e6b59f11e6cde9cc9038f3335cc29

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Oct 17 13:45:09 2017 -0700

ac: Fix a compiler warning for possibly undefined "name"

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

---

 src/amd/common/ac_llvm_build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
index e5cd23e025..4d8f42d572 100644
--- a/src/amd/common/ac_llvm_build.c
+++ b/src/amd/common/ac_llvm_build.c
@@ -1257,7 +1257,7 @@ LLVMValueRef ac_build_image_opcode(struct ac_llvm_context *ctx,
 	LLVMTypeRef dst_type;
 	LLVMValueRef args[11];
 	unsigned num_args = 0;
-	const char *name;
+	const char *name = NULL;
 	char intr_name[128], type[64];
 
 	if (HAVE_LLVM >= 0x0400) {




More information about the mesa-commit mailing list