mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 16:38:09 +02:00
progs/samples: silence warnings
This commit is contained in:
parent
59e743b8d3
commit
bf1974b37d
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue