Patched to avoid compiler warning. trunk
authorRyan C. Gordon <icculus@icculus.org>
Mon, 05 May 2008 22:17:17 -0400
branchtrunk
changeset 283 9d51531ffd49
parent 282 21d1615a627e
child 284 ea52f9707795
Patched to avoid compiler warning.
mojoshader.c
--- a/mojoshader.c	Mon May 05 22:16:22 2008 -0400
+++ b/mojoshader.c	Mon May 05 22:17:17 2008 -0400
@@ -2019,7 +2019,7 @@
 
 static void emit_GLSL_finalize(Context *ctx)
 {
-    const RegisterList *reg = NULL;
+    const RegisterList *reg;
 
     // throw some blank lines around to make source more readable.
     push_output(ctx, &ctx->globals);
@@ -2029,16 +2029,16 @@
     push_output(ctx, &ctx->mainline_intro);
     ctx->indent++;
 
-#if 0  // !!! FIXME: probably not necessary?
     // Make sure this is always set, moved from our generic attribute.
     reg = declared_attribute(ctx, MOJOSHADER_USAGE_POSITION, 0);
     if (reg != NULL)
     {
+#if 0  // !!! FIXME: probably not necessary?
         // !!! FIXME: only emit if shader didn't definitely set gl_Position.
         output_line(ctx, "gl_Position = %s;",
                             get_GLSL_varname(ctx, reg->regtype, reg->regnum));
+#endif
     } // if
-#endif
 
     ctx->indent--;
     pop_output(ctx);