r300g: Silence uninitialized variable warning.
authorVinson Lee <vlee@vmware.com>
Sat, 25 Sep 2010 02:33:43 +0000 (19:33 -0700)
committerVinson Lee <vlee@vmware.com>
Sat, 25 Sep 2010 02:33:43 +0000 (19:33 -0700)
Silence this GCC warning.
r300_state_derived.c: In function 'r300_update_derived_state':
r300_state_derived.c:578: warning: 'r' may be used uninitialized in this function
r300_state_derived.c:578: note: 'r' was declared here

src/gallium/drivers/r300/r300_state_derived.c

index 566a828871daa864ea2624fe94e6ffbf3d4265b5..0c3fa200c8287201c6c0720b9e75888f57ed73c6 100644 (file)
@@ -630,6 +630,7 @@ static uint32_t r300_get_border_color(enum pipe_format format,
                     ((float_to_ubyte(border_swizzled[2]) & 0xf8) << 8);
             } else {
                 assert(0);
+                r = 0;
             }
             break;