From 9e6c358a5bb6255c0302871b8b4dd6aa2bd7735b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 29 Jul 2019 19:08:55 -0400 Subject: [PATCH] SDL2: more const in xpm code --- src/sdl/IMG_xpm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sdl/IMG_xpm.c b/src/sdl/IMG_xpm.c index 4c56ce363..f156335fa 100644 --- a/src/sdl/IMG_xpm.c +++ b/src/sdl/IMG_xpm.c @@ -79,7 +79,7 @@ int IMG_isXPM(SDL_RWops *src) #define STARTING_HASH_SIZE 256 struct hash_entry { - char *key; + const char *key; Uint32 color; struct hash_entry *next; }; @@ -152,7 +152,7 @@ static struct color_hash *create_colorhash(int maxnum) } static int add_colorhash(struct color_hash *hash, - char *key, int cpp, Uint32 color) + const char *key, int cpp, Uint32 color) { int index = hash_key(key, cpp, hash->size); struct hash_entry *e = hash->next_free++; @@ -195,7 +195,7 @@ static void free_colorhash(struct color_hash *hash) static int color_to_rgb(const char *spec, int speclen, Uint32 *rgb) { /* poor man's rgb.txt */ - static struct { char *name; Uint32 rgb; } known[] = { + static struct { const char *name; Uint32 rgb; } known[] = { { "none", 0xFFFFFFFF }, { "black", 0x000000 }, { "white", 0xFFFFFF }, @@ -926,7 +926,7 @@ static int color_to_rgb(const char *spec, int speclen, Uint32 *rgb) static char *linebuf; static int buflen; -static char *error; +static const char *error; /* * Read next line from the source.