progs/test: Initialize variable in prog_parameter.
authorVinson Lee <vlee@vmware.com>
Tue, 8 Dec 2009 02:40:37 +0000 (18:40 -0800)
committerVinson Lee <vlee@vmware.com>
Tue, 8 Dec 2009 02:40:37 +0000 (18:40 -0800)
Silences uninitialized variable compiler warning.

progs/tests/prog_parameter.c

index 0241f3a249662ae19036ca3faf2c8982fe561956..2de7e2994af994d5ab350f784098fe03ad2035bb 100644 (file)
@@ -192,6 +192,7 @@ static void Init( void )
    GLfloat * params;
    GLint max_program_env_parameters;
    GLint max_program_local_parameters;
+   int i;
 
 
    printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
@@ -238,6 +239,10 @@ static void Init( void )
 
    params = malloc(max_program_env_parameters * 4 * sizeof(GLfloat));
 
+   for (i = 0; i < max_program_env_parameters * 4; i++) {
+      params[i] = 0.0F;
+   }
+
    pass &= set_parameter_batch(max_program_env_parameters, params, "Env",
                               program_env_parameter4fv,
                               program_env_parameters4fv,