glslcompiler: Fix GCC warn_unused_result warning.
authorVinson Lee <vlee@vmware.com>
Sat, 10 Jul 2010 00:34:40 +0000 (17:34 -0700)
committerVinson Lee <vlee@vmware.com>
Sat, 10 Jul 2010 00:34:40 +0000 (17:34 -0700)
src/mesa/drivers/glslcompiler/glslcompiler.c

index 4211e69ff9b21a607e15a553424abd6bfa6c61fd..7259bf4c5600ceb0d4920506b66e9f32791ceb7b 100644 (file)
@@ -401,8 +401,12 @@ main(int argc, char *argv[])
 
    if (v_shader || f_shader || g_shader) {
       if (Options.OutputFile) {
+         FILE *f;
          fclose(stdout);
-         /*stdout =*/ freopen(Options.OutputFile, "w", stdout);
+         /*stdout =*/ f = freopen(Options.OutputFile, "w", stdout);
+         if (!f) {
+            fprintf(stderr, "freopen error\n");
+         }
       }
       if (stdout && v_shader) {
          PrintShaderInstructions(v_shader, stdout);