aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-29 17:27:22 -0600
committerBrian Paul <[email protected]>2008-07-29 17:27:22 -0600
commit6f1abb9c215583d11980294f7469da41ec14b7da (patch)
treea6ab8447746a266a96b80d38e5441e9615ab04c1 /src/mesa/shader/shader_api.c
parent1b465f287fd26d14797eca7c7a3f6cd339923e00 (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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index a401803c3e9..feb8363f503 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");
@@ -543,6 +543,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
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) {