Mesa (master): r600g: Ensure r600_src is initialized in tgsi_exp function.

Vinson Lee vlee at kemper.freedesktop.org
Wed Oct 20 19:46:37 UTC 2010


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Wed Oct 20 12:44:08 2010 -0700

r600g: Ensure r600_src is initialized in tgsi_exp function.

Silences these GCC warnings.
r600_shader.c: In function 'tgsi_exp':
r600_shader.c:2339: warning: 'r600_src[0].rel' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].abs' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].neg' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].chan' is used uninitialized in this function
r600_shader.c:2339: warning: 'r600_src[0].sel' is used uninitialized in this function

---

 src/gallium/drivers/r600/r600_shader.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index d114398..f98f055 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -2287,7 +2287,7 @@ static int tgsi_xpd(struct r600_shader_ctx *ctx)
 static int tgsi_exp(struct r600_shader_ctx *ctx)
 {
 	struct tgsi_full_instruction *inst = &ctx->parse.FullToken.FullInstruction;
-	struct r600_bc_alu_src r600_src[3];
+	struct r600_bc_alu_src r600_src[3] = { { 0 } };
 	struct r600_bc_alu alu;
 	int r;
 




More information about the mesa-commit mailing list