From: Vinson Lee Date: Wed, 22 Jan 2014 06:46:39 +0000 (-0800) Subject: meta: Move loop variable declaration outside loop. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6caf34b97e5d22f5910695e30941bea3d0bf2e46;p=mesa.git meta: Move loop variable declaration outside loop. Fixes MSVC build error introduced with commit 69b258cb4636315b4c1aaaceeedd1eed8af98ba8. meta.c(618) : error C2143: syntax error : missing ';' before 'type' meta.c(618) : error C2143: syntax error : missing ')' before 'type' meta.c(618) : error C2065: 'i' : undeclared identifier meta.c(618) : warning C4552: '<' : operator has no effect; expected operator with side-effect meta.c(618) : error C2059: syntax error : ')' meta.c(618) : error C2143: syntax error : missing ';' before '{' meta.c(619) : error C2065: 'i' : undeclared identifier meta.c(620) : error C2065: 'i' : undeclared identifier Signed-off-by: Vinson Lee --- diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 44fafac6cbb..2443a772366 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -596,6 +596,8 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) } if (state & MESA_META_SHADER) { + int i; + if (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_vertex_program) { save->VertexProgramEnabled = ctx->VertexProgram.Enabled; _mesa_reference_vertprog(ctx, &save->VertexProgram, @@ -615,7 +617,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) _mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI, GL_FALSE); } - for (int i = 0; i < MESA_SHADER_STAGES; i++) { + for (i = 0; i < MESA_SHADER_STAGES; i++) { _mesa_reference_shader_program(ctx, &save->Shader[i], ctx->Shader.CurrentProgram[i]); }