From dade65505bdf62da448479e316cc7f4f2da22417 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 15 Jul 2011 20:57:39 +0200 Subject: [PATCH] prog_optimize: fix a warning that a variable may be uninitialized --- src/mesa/program/prog_optimize.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index 11debc485eb..8a40fa69eca 100644 --- a/src/mesa/program/prog_optimize.c +++ b/src/mesa/program/prog_optimize.c @@ -1304,6 +1304,9 @@ _mesa_simplify_cmp(struct gl_program * program) assert(inst->DstReg.Index < REG_ALLOCATE_MAX_PROGRAM_TEMPS); prevWriteMask = tempWrites[inst->DstReg.Index]; tempWrites[inst->DstReg.Index] |= inst->DstReg.WriteMask; + } else { + /* No other register type can be a destination register. */ + continue; } /* For a CMP to be considered a conditional write, the destination -- 2.30.2