r300/compiler: Silence uninitialized variable warning.
authorVinson Lee <vlee@vmware.com>
Wed, 25 Aug 2010 06:04:20 +0000 (23:04 -0700)
committerVinson Lee <vlee@vmware.com>
Wed, 25 Aug 2010 06:04:20 +0000 (23:04 -0700)
commit0ae6b30c147e6a237cd4e6338975e46de5a95565
tree14fa84b8207dc9a94135c3444123c6bf7fae033a
parent19f9340e6741611779ec2b78b60f521330984077
r300/compiler: Silence uninitialized variable warning.

The variable loops would be used uninitialized if it ever processed a
RC_OPCODE_ENDLOOP case first.

This patch initalizes the loops variable to NULL and adds an assert at
the RC_OPCODE_ENDLOOP case that loops isn't NULL.

Silence the following GCC warning.
r3xx_vertprog.c: In function 'translate_vertex_program':
r3xx_vertprog.c:469: warning: 'loops' may be used uninitialized in this function
src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c