From b37c0f6cd628a46cb41c879255fc33611be52b10 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 12 Aug 2018 15:27:58 +0200 Subject: [PATCH] Replace Uint32 by int to fix warnings in tinyxpm --- app/src/tinyxpm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/tinyxpm.c b/app/src/tinyxpm.c index dafe6cac..949aeeae 100644 --- a/app/src/tinyxpm.c +++ b/app/src/tinyxpm.c @@ -40,15 +40,15 @@ SDL_Surface *read_xpm(char *xpm[]) { // *** No error handling, assume the XPM source is valid *** // (it's in our source repo) // Assertions are only checked in debug - Uint32 width = strtol(xpm[0], &endptr, 10); - Uint32 height = strtol(endptr + 1, &endptr, 10); - Uint32 colors = strtol(endptr + 1, &endptr, 10); - Uint32 chars = strtol(endptr + 1, &endptr, 10); + int width = strtol(xpm[0], &endptr, 10); + int height = strtol(endptr + 1, &endptr, 10); + int colors = strtol(endptr + 1, &endptr, 10); + int chars = strtol(endptr + 1, &endptr, 10); // sanity checks - SDL_assert(width < 256); - SDL_assert(height < 256); - SDL_assert(colors < 256); + SDL_assert(0 <= width && width < 256); + SDL_assert(0 <= height && height < 256); + SDL_assert(0 <= colors && colors < 256); SDL_assert(chars == 1); // this implementation does not support more // init index