diff options
author | Brian Paul <[email protected]> | 2008-07-25 08:34:54 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-07-25 08:34:54 -0600 |
commit | 72809f377397390fdd110d6b15e8a9a64ada05e6 (patch) | |
tree | 04a4c09d2989ecae17d3ed5aad42f3c3038a4c2d /src/mesa/shader/shader_api.c | |
parent | 03de81aea1c02d8b29784950a456e43b4fc9d538 (diff) |
mesa: fix issues causing warnings on Windows
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r-- | src/mesa/shader/shader_api.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 6423c41c122..5c18e55dacf 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -509,7 +509,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, struct gl_shader_program *shProg; const GLint size = -1; /* unknown size */ GLint i, oldIndex; - GLenum datatype; + GLenum datatype = GL_FLOAT_VEC4; shProg = _mesa_lookup_shader_program_err(ctx, program, "glBindAttribLocation"); @@ -539,14 +539,11 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index, oldIndex = -1; } - /* XXX: `datatype' is uninitialised at this point -- windows compiler - * will issue a warning for the following line. - */ - /* this will replace the current value if it's already in the list */ i = _mesa_add_attribute(shProg->Attributes, name, size, datatype, index); if (i < 0) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindAttribLocation"); + return; } if (shProg->VertexProgram && oldIndex >= 0 && oldIndex != index) { |