Skip to content

Commit

Permalink
warning fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Mar 3, 2023
1 parent a61c2fc commit 32442d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions IMG_avif.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion IMG_gif.c
Expand Up @@ -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))) {
Expand All @@ -391,6 +391,7 @@ ReadColorMap(SDL_RWops *src, int number,
else
*gray = PPM_TYPE;
#else
(void) flag;
*gray = 0;
#endif

Expand Down

0 comments on commit 32442d0

Please sign in to comment.