svga: fix warning: ‘uc.ui’ may be used uninitialized in this function
authorMarek Olšák <maraeo@gmail.com>
Wed, 27 Apr 2011 11:02:32 +0000 (13:02 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 27 Apr 2011 11:16:35 +0000 (13:16 +0200)
This is safe because it's initialized if buffers & PIPE_CLEAR_COLOR and
probably doesn't have any effect otherwise.

src/gallium/drivers/svga/svga_pipe_clear.c

index b288c3eb2a6d73c502a13424fbcca4a3c1872802..2bba77769ad7603bcc3b2195487aa6f8b2a37fa7 100644 (file)
@@ -46,7 +46,7 @@ try_clear(struct svga_context *svga,
    boolean restore_viewport = FALSE;
    SVGA3dClearFlag flags = 0;
    struct pipe_framebuffer_state *fb = &svga->curr.framebuffer;
-   union util_color uc;
+   union util_color uc = {0};
 
    ret = svga_update_state(svga, SVGA_STATE_HW_CLEAR);
    if (ret)