Mesa (master): st/mesa: fix warning: ‘user_memory’ may be used uninitialized in this function
Marek Olšák
mareko at kemper.freedesktop.org
Wed Apr 27 11:17:53 UTC 2011
Module: Mesa
Branch: master
Commit: e031bed122a8902808b197549e7952cde10d310c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e031bed122a8902808b197549e7952cde10d310c
Author: Marek Olšák <maraeo at gmail.com>
Date: Wed Apr 27 13:04:21 2011 +0200
st/mesa: fix warning: ‘user_memory’ may be used uninitialized in this function
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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index d27043e..46a4f9c 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -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];
More information about the mesa-commit
mailing list