diff options
author | Vinson Lee <[email protected]> | 2009-12-26 01:08:26 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2009-12-26 01:08:26 -0800 |
commit | e81fe088f447b959b354fadf0d73fcc7ac7c468d (patch) | |
tree | bd09b205a05817524ffdcac5f785b67075e234a4 /progs/demos/terrain.c | |
parent | cdc69e34694a16e9f762aba45d7eba05e9dc8514 (diff) |
progs/demos: Silence warn_unused_result warnings.
Diffstat (limited to 'progs/demos/terrain.c')
-rw-r--r-- | progs/demos/terrain.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/progs/demos/terrain.c b/progs/demos/terrain.c index be78ea4950f..9ba7b61a63f 100644 --- a/progs/demos/terrain.c +++ b/progs/demos/terrain.c @@ -8,6 +8,7 @@ * based on a Mikael SkiZoWalker's (MoDEL) / France ([email protected]) demo */ +#include <assert.h> #include <stdio.h> #include <math.h> #include <stdlib.h> @@ -559,12 +560,14 @@ loadpic(void) FILE *FilePic; int i, tmp; GLenum gluerr; + size_t result; if ((FilePic = fopen("terrain.dat", "r")) == NULL) { fprintf(stderr, "Error loading terrain.dat\n"); exit(-1); } - fread(bufferter, 256 * 256, 1, FilePic); + result = fread(bufferter, 256 * 256, 1, FilePic); + assert(result == 1); fclose(FilePic); for (i = 0; i < (256 * 256); i++) { |