r300g: Silence uninitialized variable warning.
authorVinson Lee <vlee@vmware.com>
Wed, 27 Oct 2010 16:02:00 +0000 (09:02 -0700)
committerVinson Lee <vlee@vmware.com>
Wed, 27 Oct 2010 16:02:00 +0000 (09:02 -0700)
Fixes this GCC warning.
r300_state_derived.c: In function 'r300_update_derived_state':
r300_state_derived.c:593: warning: 'r' may be used uninitialized in this function
r300_state_derived.c:593: note: 'r' was declared here

src/gallium/drivers/r300/r300_state_derived.c

index 730ef7a3ee26b01ec6c474e1803d9d42bd9bc7e2..efec9495104e0ee30f911010cddf20cbac32994e 100644 (file)
@@ -633,6 +633,11 @@ static uint32_t r300_get_border_color(enum pipe_format format,
                 ((float_to_ubyte(border_swizzled[0]) & 0xff) << 16) |
                 ((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
             break;
+
+        default:
+            assert(0);
+            r = 0;
+            break;
     }
 
     return r;