st/mesa: fix warning: ‘user_memory’ may be used uninitialized in this function
authorMarek Olšák <maraeo@gmail.com>
Wed, 27 Apr 2011 11:04:21 +0000 (13:04 +0200)
committerMarek Olšák <maraeo@gmail.com>
Wed, 27 Apr 2011 11:16:35 +0000 (13:16 +0200)
It's initialized later in a conditional the condition of which is always true
the first time it's evaluated.

src/mesa/state_tracker/st_draw.c

index d27043ec296f95d71bf36271fc4a97b4c4180ffb..46a4f9cf8c53f4f7a430b121385208b54fb369d9 100644 (file)
@@ -247,7 +247,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
    const struct gl_buffer_object *firstBufObj = NULL;
    GLint firstStride = -1;
    const GLubyte *client_addr = NULL;
-   GLboolean user_memory;
+   GLboolean user_memory = GL_FALSE;
 
    for (attr = 0; attr < vpv->num_inputs; attr++) {
       const GLuint mesaAttr = vp->index_to_input[attr];