music.c
changeset 621 944412baab72
parent 616 7ead8213dfb0
child 625 1d489d8ec2e0
     1.1 --- a/music.c	Mon May 27 13:35:45 2013 -0700
     1.2 +++ b/music.c	Sat Jun 01 10:11:20 2013 -0700
     1.3 @@ -163,7 +163,7 @@
     1.4  
     1.5  static void add_music_decoder(const char *decoder)
     1.6  {
     1.7 -    void *ptr = SDL_realloc(music_decoders, (num_decoders + 1) * sizeof (const char **));
     1.8 +    void *ptr = SDL_realloc((void *)music_decoders, (num_decoders + 1) * sizeof (const char **));
     1.9      if (ptr == NULL) {
    1.10          return;  /* oh well, go on without it. */
    1.11      }
    1.12 @@ -466,7 +466,7 @@
    1.13      Uint8 magic[5];
    1.14      Uint8 moremagic[9];
    1.15  
    1.16 -    int start = SDL_RWtell(rw);
    1.17 +    Sint64 start = SDL_RWtell(rw);
    1.18      if (SDL_RWread(rw, magic, 1, 4) != 4 || SDL_RWread(rw, moremagic, 1, 8) != 8 ) {
    1.19          Mix_SetError("Couldn't read from RWops");
    1.20          return MUS_NONE;
    1.21 @@ -619,11 +619,11 @@
    1.22          /* The WAVE loader needs the first 4 bytes of the header */
    1.23          {
    1.24              Uint8 magic[5];
    1.25 -            int start = SDL_RWtell(rw);
    1.26 +            Sint64 start = SDL_RWtell(rw);
    1.27              if (SDL_RWread(rw, magic, 1, 4) != 4) {
    1.28                  Mix_SetError("Couldn't read from RWops");
    1.29                  SDL_free(music);
    1.30 -                return MUS_NONE;
    1.31 +                return NULL;
    1.32              }
    1.33              SDL_RWseek(rw, start, RW_SEEK_SET);
    1.34              magic[4] = '\0';
    1.35 @@ -1530,7 +1530,7 @@
    1.36  #endif
    1.37  
    1.38      /* rcg06042009 report available decoders at runtime. */
    1.39 -    SDL_free(music_decoders);
    1.40 +    SDL_free((void *)music_decoders);
    1.41      music_decoders = NULL;
    1.42      num_decoders = 0;
    1.43