summaryrefslogtreecommitdiffstats
path: root/progs/tests
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-01-02 21:52:51 -0800
committerVinson Lee <[email protected]>2010-01-02 21:52:51 -0800
commit32d18924dff424eb2e06454193c6c2024f1b2795 (patch)
treef25d2a3c0897f00eca947a317cf6fe9c7eab4ce8 /progs/tests
parentd27effbfd88463fc395c364c4e6fc59636074bda (diff)
progs/tests: Silence warn_unused_result warning.
Diffstat (limited to 'progs/tests')
-rw-r--r--progs/tests/vparray.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/progs/tests/vparray.c b/progs/tests/vparray.c
index af9b62d33e6..fe168c6cd56 100644
--- a/progs/tests/vparray.c
+++ b/progs/tests/vparray.c
@@ -37,13 +37,16 @@ static void read_surface( char *filename )
}
numverts = 0;
- while (!feof(f) && numverts < MAXVERTS) {
- fscanf( f, "%f %f %f %f %f %f",
- &data[numverts][0], &data[numverts][1], &data[numverts][2],
- &data[numverts][3], &data[numverts][4], &data[numverts][5] );
+ while (numverts < MAXVERTS) {
+ int result;
+ result = fscanf( f, "%f %f %f %f %f %f",
+ &data[numverts][0], &data[numverts][1], &data[numverts][2],
+ &data[numverts][3], &data[numverts][4], &data[numverts][5] );
+ if (result == EOF) {
+ break;
+ }
numverts++;
}
- numverts--;
printf("%d vertices, %d triangles\n", numverts, numverts-2);
printf("data = %p\n", (void *) data);