mesa: move variable declaration out of loop to fix MSVC build
authorBrian Paul <brianp@vmware.com>
Tue, 12 Jun 2012 22:31:33 +0000 (16:31 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 12 Jun 2012 22:31:36 +0000 (16:31 -0600)
src/mesa/main/shaderobj.c

index d5ebf54af8e5f6f96c5304474f156c78143c28a0..16800ae5ec6509028b4a4b36cf65edd04ad3bf9f 100644 (file)
@@ -278,7 +278,8 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
                                 struct gl_shader_program *shProg)
 {
    if (shProg->UniformStorage) {
-      for (unsigned i = 0; i < shProg->NumUserUniformStorage; ++i)
+      unsigned i;
+      for (i = 0; i < shProg->NumUserUniformStorage; ++i)
          _mesa_uniform_detach_all_driver_storage(&shProg->UniformStorage[i]);
       ralloc_free(shProg->UniformStorage);
       shProg->NumUserUniformStorage = 0;