u_vbuf: Silence uninitialized variable warnings.
authorVinson Lee <vlee@vmware.com>
Wed, 30 Nov 2011 23:32:16 +0000 (15:32 -0800)
committerVinson Lee <vlee@vmware.com>
Thu, 1 Dec 2011 19:41:14 +0000 (11:41 -0800)
Fixes these GCC warnings.
u_vbuf.c: In function ‘u_vbuf_draw_begin’:
u_vbuf.c:839:20: warning: ‘max_index’ may be used uninitialized in this function [-Wuninitialized]
u_vbuf.c:838:20: warning: ‘min_index’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/util/u_vbuf.c

index f6da91203431eccdeff8448ffa8adf179d34037f..5b0e26e30db2939d21efcbf9f09bc080cf1445de 100644 (file)
@@ -808,6 +808,8 @@ static void u_vbuf_get_minmax_index(struct pipe_context *pipe,
    }
    default:
       assert(0);
+      *out_min_index = 0;
+      *out_max_index = 0;
    }
 
    if (transfer) {