summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-07-09 17:34:40 -0700
committerVinson Lee <[email protected]>2010-07-09 17:34:40 -0700
commit0c767b9ae6f56968cd35efcaa79c74375ca692d6 (patch)
treea7862dd215347bfe4425ba2b95320313478a17b0 /src
parent16def3087070d55b2f6c823e825463e87a06cd02 (diff)
glslcompiler: Fix GCC warn_unused_result warning.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/glslcompiler/glslcompiler.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/glslcompiler/glslcompiler.c b/src/mesa/drivers/glslcompiler/glslcompiler.c
index 4211e69ff9b..7259bf4c560 100644
--- a/src/mesa/drivers/glslcompiler/glslcompiler.c
+++ b/src/mesa/drivers/glslcompiler/glslcompiler.c
@@ -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);