summaryrefslogtreecommitdiffstats
path: root/src/glsl/apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/apps')
-rw-r--r--src/glsl/apps/compile.c7
-rw-r--r--src/glsl/apps/process.c3
-rw-r--r--src/glsl/apps/purify.c3
-rw-r--r--src/glsl/apps/tokenise.c3
-rw-r--r--src/glsl/apps/version.c3
5 files changed, 18 insertions, 1 deletions
diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c
index 21c2b7617e9..3aa4fd4d53e 100644
--- a/src/glsl/apps/compile.c
+++ b/src/glsl/apps/compile.c
@@ -37,7 +37,7 @@ static void
usage(void)
{
printf("Usage:\n");
- printf(" compile fragment|vertex <source> <output>\n");
+ printf(" compile fragment|vertex|geometry <source> <output>\n");
}
int
@@ -65,6 +65,8 @@ main(int argc,
shader_type = 1;
} else if (!strcmp(argv[1], "vertex")) {
shader_type = 2;
+ } else if (!strcmp(argv[1], "geometry")) {
+ shader_type = 3;
} else {
usage();
return 1;
@@ -80,6 +82,9 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
+ if (size == -1) {
+ return 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 c8a1a1868cc..caf72a71cf1 100644
--- a/src/glsl/apps/process.c
+++ b/src/glsl/apps/process.c
@@ -59,6 +59,9 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
+ if (size == -1) {
+ return 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 5ab6bae96d1..0f09b157efd 100644
--- a/src/glsl/apps/purify.c
+++ b/src/glsl/apps/purify.c
@@ -58,6 +58,9 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
+ if (size == -1) {
+ return 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 b4c6d609300..f89f47d0611 100644
--- a/src/glsl/apps/tokenise.c
+++ b/src/glsl/apps/tokenise.c
@@ -58,6 +58,9 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
+ if (size == -1) {
+ return 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 9820ad94dc9..fa5c226da83 100644
--- a/src/glsl/apps/version.c
+++ b/src/glsl/apps/version.c
@@ -57,6 +57,9 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
+ if (size == -1) {
+ return 1;
+ }
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");