Cleaned up compiler warnings
authorSam Lantinga <slouken@libsdl.org>
Sat, 03 Oct 2009 03:35:05 +0000
changeset 408fc6c4861e8ec
parent 407 73a92ea2c061
child 409 2ba29d53be77
Cleaned up compiler warnings
SDL_mixer.h
music.c
timidity/instrum.c
timidity/playmidi.c
wavestream.c
     1.1 --- a/SDL_mixer.h	Fri Oct 02 14:16:12 2009 +0000
     1.2 +++ b/SDL_mixer.h	Sat Oct 03 03:35:05 2009 +0000
     1.3 @@ -105,7 +105,7 @@
     1.4  	MUS_OGG,
     1.5  	MUS_MP3,
     1.6  	MUS_MP3_MAD,
     1.7 -	MUS_FLAC,
     1.8 +	MUS_FLAC
     1.9  } Mix_MusicType;
    1.10  
    1.11  /* The internal format for a music chunk interpreted via mikmod */
     2.1 --- a/music.c	Fri Oct 02 14:16:12 2009 +0000
     2.2 +++ b/music.c	Sat Oct 03 03:35:05 2009 +0000
     2.3 @@ -1505,17 +1505,14 @@
     2.4  }
     2.5  MODULE *MikMod_LoadSongRW(SDL_RWops *rw, int maxchan)
     2.6  {
     2.7 -	LMM_MREADER lmmmr={
     2.8 -		LMM_Seek,
     2.9 -		LMM_Tell,
    2.10 -		LMM_Read,
    2.11 -		LMM_Get,
    2.12 -		LMM_Eof,
    2.13 +	LMM_MREADER lmmmr = {
    2.14 +		{ LMM_Seek, LMM_Tell, LMM_Read, LMM_Get, LMM_Eof },
    2.15  		0,
    2.16  		0,
    2.17 -		rw
    2.18 +		0
    2.19  	};
    2.20  	MODULE *m;
    2.21 +        lmmmr.rw = rw;
    2.22  	lmmmr.offset=SDL_RWtell(rw);
    2.23  	SDL_RWseek(rw,0,SEEK_END);
    2.24  	lmmmr.eof=SDL_RWtell(rw);
     3.1 --- a/timidity/instrum.c	Fri Oct 02 14:16:12 2009 +0000
     3.2 +++ b/timidity/instrum.c	Sat Oct 03 03:35:05 2009 +0000
     3.3 @@ -255,7 +255,7 @@
     3.4  				   int strip_loop, int strip_envelope,
     3.5  				   int strip_tail, int bank, int gm_num, int sf_ix)
     3.6  {
     3.7 -  InstrumentLayer *lp, *lastlp, *headlp;
     3.8 +  InstrumentLayer *lp, *lastlp, *headlp = 0;
     3.9    Instrument *ip;
    3.10    FILE *fp;
    3.11    uint8 tmp[1024];
    3.12 @@ -266,7 +266,7 @@
    3.13    int sf2flag = 0;
    3.14    int right_samples = 0;
    3.15    int stereo_channels = 1, stereo_layer;
    3.16 -  int vlayer_list[19][4], vlayer, vlayer_count;
    3.17 +  int vlayer_list[19][4], vlayer, vlayer_count = 0;
    3.18  
    3.19    if (!name) return 0;
    3.20    
    3.21 @@ -427,7 +427,7 @@
    3.22  
    3.23   for (stereo_layer = 0; stereo_layer < stereo_channels; stereo_layer++)
    3.24   {
    3.25 -  int sample_count;
    3.26 +  int sample_count = 0;
    3.27  
    3.28    if (stereo_layer == 0) sample_count = ip->left_samples;
    3.29    else if (stereo_layer == 1) sample_count = ip->right_samples;
    3.30 @@ -437,10 +437,10 @@
    3.31        uint8 fractions;
    3.32        int32 tmplong;
    3.33        uint16 tmpshort;
    3.34 -      uint16 sample_volume;
    3.35 +      uint16 sample_volume = 0;
    3.36        uint8 tmpchar;
    3.37 -      Sample *sp;
    3.38 -      uint8 sf2delay;
    3.39 +      Sample *sp = 0;
    3.40 +      uint8 sf2delay = 0;
    3.41  
    3.42  #define READ_CHAR(thing) \
    3.43        if (1 != fread(&tmpchar, 1, 1, fp)) goto fail; \
     4.1 --- a/timidity/playmidi.c	Fri Oct 02 14:16:12 2009 +0000
     4.2 +++ b/timidity/playmidi.c	Sat Oct 03 03:35:05 2009 +0000
     4.3 @@ -40,18 +40,9 @@
     4.4  #include "tables.h"
     4.5  
     4.6  
     4.7 -static int dont_cspline=0;
     4.8 -static int opt_dry = 1;
     4.9  static int opt_expression_curve = 2;
    4.10  static int opt_volume_curve = 2;
    4.11  static int opt_stereo_surround = 0;
    4.12 -static int dont_filter_melodic=1;
    4.13 -static int dont_filter_drums=1;
    4.14 -static int dont_chorus=0;
    4.15 -static int dont_reverb=0;
    4.16 -static int current_interpolation=1;
    4.17 -static int dont_keep_looping=0;
    4.18 -static int voice_reserve=0;
    4.19  
    4.20  
    4.21  Channel channel[MAXCHAN];
    4.22 @@ -344,7 +335,6 @@
    4.23    int vol = channel[chan].volume;
    4.24    int expr = channel[chan].expression;
    4.25    int vel = vcurve[voice[v].velocity];
    4.26 -  int drumpan = NO_PANNING;
    4.27    FLOAT_T curved_expression, curved_volume;
    4.28  
    4.29    if (channel[chan].kit)
     5.1 --- a/wavestream.c	Fri Oct 02 14:16:12 2009 +0000
     5.2 +++ b/wavestream.c	Sat Oct 03 03:35:05 2009 +0000
     5.3 @@ -192,7 +192,7 @@
     5.4  				worksize = original_len*music->cvt.len_mult;
     5.5  				music->cvt.buf=(Uint8 *)malloc(worksize);
     5.6  				if ( music->cvt.buf == NULL ) {
     5.7 -					return;
     5.8 +					return 0;
     5.9  				}
    5.10  				music->cvt.len = original_len;
    5.11  			}