summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-02-22 23:49:50 -0800
committerVinson Lee <vlee@vmware.com>2010-02-22 23:49:50 -0800
commit83a5b7e4689dcc36789f567847ccf65db858a9f3 (patch)
tree05080fcb109924b7c3eca0808e90a0061f4f142a
parenta0fe36a39b92780efd2374b66f16b39e541f1172 (diff)
glsl/apps: Assert that ftell does not return an error.
-rw-r--r--src/glsl/apps/compile.c1
-rw-r--r--src/glsl/apps/process.c1
-rw-r--r--src/glsl/apps/purify.c2
-rw-r--r--src/glsl/apps/tokenise.c1
-rw-r--r--src/glsl/apps/version.c1
5 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c
index 3b3c083c2e..21c2b7617e 100644
--- a/src/glsl/apps/compile.c
+++ b/src/glsl/apps/compile.c
@@ -79,6 +79,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
+ assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[3], "w");
diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c
index e65f35cc00..c8a1a1868c 100644
--- a/src/glsl/apps/process.c
+++ b/src/glsl/apps/process.c
@@ -58,6 +58,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
+ assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");
diff --git a/src/glsl/apps/purify.c b/src/glsl/apps/purify.c
index 3019e8b220..5ab6bae96d 100644
--- a/src/glsl/apps/purify.c
+++ b/src/glsl/apps/purify.c
@@ -25,6 +25,7 @@
*
**************************************************************************/
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -56,6 +57,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
+ assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");
diff --git a/src/glsl/apps/tokenise.c b/src/glsl/apps/tokenise.c
index c70c3ccbb1..b4c6d60930 100644
--- a/src/glsl/apps/tokenise.c
+++ b/src/glsl/apps/tokenise.c
@@ -57,6 +57,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
+ assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");
diff --git a/src/glsl/apps/version.c b/src/glsl/apps/version.c
index 0420f97294..9820ad94dc 100644
--- a/src/glsl/apps/version.c
+++ b/src/glsl/apps/version.c
@@ -56,6 +56,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
+ assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");