SDL_image: warning fixes.

From 32442d0338202e9cd1335a78a786d7ae669979a9 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 3 Mar 2023 20:50:10 +0300
Subject: [PATCH] warning fixes.

---
 IMG_avif.c | 8 +++++---
 IMG_gif.c  | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/IMG_avif.c b/IMG_avif.c
index 22f2a733..7f8d4e2e 100644
--- a/IMG_avif.c
+++ b/IMG_avif.c
@@ -88,8 +88,8 @@ void IMG_QuitAVIF()
 static SDL_bool ReadAVIFHeader(SDL_RWops *src, Uint8 **header_data, size_t *header_size)
 {
     Uint8 magic[16];
-    Uint64 size;
-    size_t read = 0;
+    Sint64 size;
+    Sint64 read = 0;
     Uint8 *data;
 
     *header_data = NULL;
@@ -133,7 +133,7 @@ static SDL_bool ReadAVIFHeader(SDL_RWops *src, Uint8 **header_data, size_t *head
     }
 
     /* Read in the header */
-    data = (Uint8 *)SDL_malloc(size);
+    data = (Uint8 *)SDL_malloc((size_t)size);
     if (!data) {
         return SDL_FALSE;
     }
@@ -189,6 +189,8 @@ static avifResult ReadAVIFIO(struct avifIO * io, uint32_t readFlags, uint64_t of
 {
     avifIOContext *context = (avifIOContext *)io->data;
 
+    (void) readFlags;   /* not used */
+
     /* The AVIF reader bounces all over, so always seek to the correct offset */
     if (SDL_RWseek(context->src, context->start + offset, SDL_RW_SEEK_SET) < 0) {
         return AVIF_RESULT_IO_ERROR;
diff --git a/IMG_gif.c b/IMG_gif.c
index 4ee71abb..ca67ec95 100644
--- a/IMG_gif.c
+++ b/IMG_gif.c
@@ -372,7 +372,7 @@ ReadColorMap(SDL_RWops *src, int number,
     unsigned char rgb[3];
     int flag;
 
-    flag = TRUE;
+    flag = 1;
 
     for (i = 0; i < number; ++i) {
         if (!ReadOK(src, rgb, sizeof(rgb))) {
@@ -391,6 +391,7 @@ ReadColorMap(SDL_RWops *src, int number,
     else
         *gray = PPM_TYPE;
 #else
+    (void) flag;
     *gray = 0;
 #endif