From f02a5f6cc55fc61229a038ac72edb3ce97cb6950 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 12 Jul 2002 15:54:01 +0000 Subject: Pedantic compiler fixes (Sven Panne) --- progs/samples/loadppm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'progs/samples/loadppm.c') diff --git a/progs/samples/loadppm.c b/progs/samples/loadppm.c index bf7c8dd1e8..5d3e3ab56f 100644 --- a/progs/samples/loadppm.c +++ b/progs/samples/loadppm.c @@ -30,7 +30,7 @@ static PPMImage *LoadPPM(const char *filename) exit(1); } - result = malloc(sizeof(PPMImage)); + result = (PPMImage *) malloc(sizeof(PPMImage)); if (!result) { fprintf(stderr, "Unable to allocate memory\n"); @@ -52,7 +52,7 @@ static PPMImage *LoadPPM(const char *filename) while (fgetc(fp) != '\n') ; - result->data = malloc(3 * result->sizeX * result->sizeY); + result->data = (GLubyte *) malloc(3 * result->sizeX * result->sizeY); if (!result) { fprintf(stderr, "Unable to allocate memory\n"); -- cgit v1.2.3