From 02af59ab7e79f0a7815eb0288ebc01e8a61cb0b5 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 31 Jul 2008 17:57:00 -0400 Subject: [PATCH] Fixed compiler warnings. --HG-- branch : trunk --- mojoshader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 11324aa2..2f3c9cdb 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -2333,9 +2333,6 @@ static void emit_GLSL_const_array(Context *ctx, const ConstantsList *clist, int base, int size) { const char *varname = get_GLSL_const_array_varname(ctx, base, size); - const char *cstr = NULL; - const int origscratch = ctx->scratchidx; - int i; #if 0 // !!! FIXME: fails on Nvidia's and Apple's GL, even with #version 120. @@ -2343,10 +2340,13 @@ static void emit_GLSL_const_array(Context *ctx, const ConstantsList *clist, if (ctx->support_glsl120) { // GLSL 1.20 can do constant arrays. + const char *cstr = NULL; + const int origscratch = ctx->scratchidx; push_output(ctx, &ctx->globals); output_line(ctx, "const vec4 %s[%d] = vec4[%d](", varname, size, size); ctx->indent++; + int i; for (i = 0; i < size; i++) { while (clist->constant.type != MOJOSHADER_UNIFORM_FLOAT)