From 5f04ed5fbd4f3f6591b3ec59642b5ff608a93c43 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Wed, 31 Jul 2019 00:06:50 +0300 Subject: [PATCH] SDL_iconv_string: add (char*) casts before SDL_malloc() calls. --- src/stdlib/SDL_iconv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stdlib/SDL_iconv.c b/src/stdlib/SDL_iconv.c index 77e83a465287c..d52fa35592894 100644 --- a/src/stdlib/SDL_iconv.c +++ b/src/stdlib/SDL_iconv.c @@ -888,7 +888,7 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, } stringsize = inbytesleft > 4 ? inbytesleft : 4; - string = SDL_malloc(stringsize); + string = (char *) SDL_malloc(stringsize); if (!string) { SDL_iconv_close(cd); return NULL; @@ -904,7 +904,7 @@ SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, { char *oldstring = string; stringsize *= 2; - string = SDL_realloc(string, stringsize); + string = (char *) SDL_realloc(string, stringsize); if (!string) { SDL_iconv_close(cd); return NULL;