sdl2-compat: add missing casts to malloc results

From 5304c929df6cd271fc4c9338fb11048d78b251b2 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 4 Jan 2023 14:33:02 +0300
Subject: [PATCH] add missing casts to malloc results

---
 src/sdl2_compat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index c8a1313..69c2ea1 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -2884,7 +2884,7 @@ SDL_RenderDrawPoints(SDL_Renderer *renderer,
         return -1;
     }
 
-    fpoints = SDL_malloc(sizeof (SDL_FPoint) * count);
+    fpoints = (SDL_FPoint *) SDL_malloc(sizeof (SDL_FPoint) * count);
     if (fpoints == NULL) {
         return SDL_OutOfMemory();
     }
@@ -2940,7 +2940,7 @@ SDL_RenderDrawLines(SDL_Renderer *renderer, const SDL_Point *points, int count)
         return 0;
     }
 
-    fpoints = SDL_malloc(sizeof (SDL_FPoint) * count);
+    fpoints = (SDL_FPoint *) SDL_malloc(sizeof (SDL_FPoint) * count);
     if (fpoints == NULL) {
         return SDL_OutOfMemory();
     }
@@ -3026,7 +3026,7 @@ SDL_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count)
         return 0;
     }
 
-    frects = SDL_malloc(sizeof (SDL_FRect) * count);
+    frects = (SDL_FRect *) SDL_malloc(sizeof (SDL_FRect) * count);
     if (frects == NULL) {
         return SDL_OutOfMemory();
     }