projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59e743b
)
progs/samples: silence warnings
author
Brian Paul
<brianp@vmware.com>
Wed, 17 Mar 2010 16:11:09 +0000
(10:11 -0600)
committer
Brian Paul
<brianp@vmware.com>
Wed, 17 Mar 2010 16:11:09 +0000
(10:11 -0600)
progs/samples/loadppm.c
patch
|
blob
|
history
diff --git
a/progs/samples/loadppm.c
b/progs/samples/loadppm.c
index be056d62940503949a0bea7e58d73c58ed0d366b..adae9b491e49ee74c9062ad93cd3f0ccdf68047a 100644
(file)
--- a/
progs/samples/loadppm.c
+++ b/
progs/samples/loadppm.c
@@
-9,7
+9,7
@@
static PPMImage *LoadPPM(const char *filename)
char buff[16];
PPMImage *result;
FILE *fp;
- int maxval;
+ int maxval
, w, h
;
fp = fopen(filename, "rb");
if (!fp)
@@
-37,11
+37,13
@@
static PPMImage *LoadPPM(const char *filename)
exit(1);
}
- if (fscanf(fp, "%
lu %lu", &result->sizeX, &result->sizeY
) != 2)
+ if (fscanf(fp, "%
d %d", &w, &h
) != 2)
{
fprintf(stderr, "Error loading image `%s'\n", filename);
exit(1);
}
+ result->sizeX = w;
+ result->sizeY = h;
if (fscanf(fp, "%d", &maxval) != 1)
{