From b1508be82295751d1b831ab5abc73258289bbdeb Mon Sep 17 00:00:00 2001 From: T_chan Date: Thu, 20 Jan 2022 22:42:08 +0000 Subject: [PATCH] Solve some warnings from the compilation --- samples/lerabot01/main.c | 2 +- samples/paletted/main.c | 2 +- samples/trimark/main.c | 1 + samples/zclip/main.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/lerabot01/main.c b/samples/lerabot01/main.c index 831b537..392d325 100644 --- a/samples/lerabot01/main.c +++ b/samples/lerabot01/main.c @@ -98,7 +98,7 @@ int ImageLoad(char *filename, Image *image) { } if ((i = fread(image->data, size, 1, file)) != 1) { - printf(stderr, "Error reading image data from %s.\n", filename); + printf("Error reading image data from %s.\n", filename); return 0; } diff --git a/samples/paletted/main.c b/samples/paletted/main.c index f41b8c9..bd7d4db 100644 --- a/samples/paletted/main.c +++ b/samples/paletted/main.c @@ -75,7 +75,7 @@ int LoadPalettedTex(const char* filename, Image* image) { } palette_header; fread(&palette_header, sizeof(palette_header), 1, filein); - image->palette = (unsigned int*) malloc(sizeof(unsigned int) * palette_header.numcolors); + image->palette = (char*) malloc(sizeof(unsigned int) * palette_header.numcolors); image->palette_width = palette_header.numcolors; fread(image->palette, sizeof(unsigned int), palette_header.numcolors, filein); diff --git a/samples/trimark/main.c b/samples/trimark/main.c index 3f4a766..3bd2004 100644 --- a/samples/trimark/main.c +++ b/samples/trimark/main.c @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/samples/zclip/main.c b/samples/zclip/main.c index a1349ff..23b47c6 100644 --- a/samples/zclip/main.c +++ b/samples/zclip/main.c @@ -193,7 +193,7 @@ int check_start() { return 0; } -void RenderTower(counter) { +void RenderTower(int counter) { counter = counter % 3; float height = (counter + 1) * 5.0f; float width = 3.5f;