Merge branch 'Solve_Warnings' into 'master'

Solve some warnings from the compilation

See merge request simulant/GLdc!83
This commit is contained in:
Luke Benstead 2022-01-25 13:44:09 +00:00
commit 9506237c47
4 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -10,6 +10,7 @@
#include <kos.h>
#include <GL/gl.h>
#include <GL/glkos.h>
#include <stdlib.h>
#include <time.h>

View File

@ -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;