Mesa (master): nv50: fix uninitialized variable in nv50_revdep_reorder

Ben Skeggs darktama at kemper.freedesktop.org
Sun Jan 24 23:49:23 UTC 2010


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

Author: Marcin Slusarz <marcin.slusarz at gmail.com>
Date:   Sun Jan 24 19:27:59 2010 +0100

nv50: fix uninitialized variable in nv50_revdep_reorder

"unsafe" is never initialized, but used
(found by valgrind)

---

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

diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index cd2fd0a..e74a526 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -3283,7 +3283,7 @@ prep_inspect_insn(struct nv50_pc *pc, const struct tgsi_full_instruction *insn)
 static unsigned
 nv50_revdep_reorder(unsigned m[4], unsigned rdep[4])
 {
-	unsigned i, c, x, unsafe;
+	unsigned i, c, x, unsafe = 0;
 
 	for (c = 0; c < 4; c++)
 		m[c] = c;




More information about the mesa-commit mailing list