Skip to content

Commit

Permalink
Fixed some compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 14, 2019
1 parent 35d6e0e commit bec87e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SDL12_compat.c
Expand Up @@ -2483,7 +2483,7 @@ static Sint64 SDLCALL
RWops12to20_size(struct SDL_RWops *rwops20)
{
SDL12_RWops *rwops12 = (SDL12_RWops *) rwops20->hidden.unknown.data1;
int size = rwops20->hidden.unknown.data2;
int size = (int) ((size_t) rwops20->hidden.unknown.data2);
int pos;

if (size != -1)
Expand All @@ -2497,8 +2497,8 @@ RWops12to20_size(struct SDL_RWops *rwops20)
if (size == -1)
return -1;

rwops12->seek(rwops12, pos, SEEK_SET); /* !!! FIXME: and if this fails? */
rwops20->hidden.unknown.data2 = size;
rwops12->seek(rwops12, pos, SEEK_SET); FIXME("...and if this fails?");
rwops20->hidden.unknown.data2 = (void *) ((size_t) size);
return size;
}

Expand Down Expand Up @@ -2555,7 +2555,7 @@ RWops12to20(SDL12_RWops *rwops12)
SDL20_zerop(rwops20);
rwops20->type = rwops12->type;
rwops20->hidden.unknown.data1 = rwops12;
rwops20->hidden.unknown.data2 = -1; /* cached size of stream */
rwops20->hidden.unknown.data2 = (void *) ((size_t) -1); /* cached size of stream */
rwops20->size = RWops12to20_size;
rwops20->seek = RWops12to20_seek;
rwops20->read = RWops12to20_read;
Expand Down

0 comments on commit bec87e1

Please sign in to comment.