Skip to content

Commit

Permalink
Cleaned up compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 3, 2009
1 parent 39827e2 commit 9f06065
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 25 deletions.
2 changes: 1 addition & 1 deletion SDL_mixer.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ typedef enum {
MUS_OGG, MUS_OGG,
MUS_MP3, MUS_MP3,
MUS_MP3_MAD, MUS_MP3_MAD,
MUS_FLAC, MUS_FLAC
} Mix_MusicType; } Mix_MusicType;


/* The internal format for a music chunk interpreted via mikmod */ /* The internal format for a music chunk interpreted via mikmod */
Expand Down
11 changes: 4 additions & 7 deletions music.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1505,17 +1505,14 @@ BOOL LMM_Eof(struct MREADER *mr)
} }
MODULE *MikMod_LoadSongRW(SDL_RWops *rw, int maxchan) MODULE *MikMod_LoadSongRW(SDL_RWops *rw, int maxchan)
{ {
LMM_MREADER lmmmr={ LMM_MREADER lmmmr = {
LMM_Seek, { LMM_Seek, LMM_Tell, LMM_Read, LMM_Get, LMM_Eof },
LMM_Tell,
LMM_Read,
LMM_Get,
LMM_Eof,
0, 0,
0, 0,
rw 0
}; };
MODULE *m; MODULE *m;
lmmmr.rw = rw;
lmmmr.offset=SDL_RWtell(rw); lmmmr.offset=SDL_RWtell(rw);
SDL_RWseek(rw,0,SEEK_END); SDL_RWseek(rw,0,SEEK_END);
lmmmr.eof=SDL_RWtell(rw); lmmmr.eof=SDL_RWtell(rw);
Expand Down
12 changes: 6 additions & 6 deletions timidity/instrum.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static InstrumentLayer *load_instrument(char *name, int font_type, int percussio
int strip_loop, int strip_envelope, int strip_loop, int strip_envelope,
int strip_tail, int bank, int gm_num, int sf_ix) int strip_tail, int bank, int gm_num, int sf_ix)
{ {
InstrumentLayer *lp, *lastlp, *headlp; InstrumentLayer *lp, *lastlp, *headlp = 0;
Instrument *ip; Instrument *ip;
FILE *fp; FILE *fp;
uint8 tmp[1024]; uint8 tmp[1024];
Expand All @@ -266,7 +266,7 @@ static InstrumentLayer *load_instrument(char *name, int font_type, int percussio
int sf2flag = 0; int sf2flag = 0;
int right_samples = 0; int right_samples = 0;
int stereo_channels = 1, stereo_layer; int stereo_channels = 1, stereo_layer;
int vlayer_list[19][4], vlayer, vlayer_count; int vlayer_list[19][4], vlayer, vlayer_count = 0;


if (!name) return 0; if (!name) return 0;


Expand Down Expand Up @@ -427,7 +427,7 @@ static InstrumentLayer *load_instrument(char *name, int font_type, int percussio


for (stereo_layer = 0; stereo_layer < stereo_channels; stereo_layer++) for (stereo_layer = 0; stereo_layer < stereo_channels; stereo_layer++)
{ {
int sample_count; int sample_count = 0;


if (stereo_layer == 0) sample_count = ip->left_samples; if (stereo_layer == 0) sample_count = ip->left_samples;
else if (stereo_layer == 1) sample_count = ip->right_samples; else if (stereo_layer == 1) sample_count = ip->right_samples;
Expand All @@ -437,10 +437,10 @@ static InstrumentLayer *load_instrument(char *name, int font_type, int percussio
uint8 fractions; uint8 fractions;
int32 tmplong; int32 tmplong;
uint16 tmpshort; uint16 tmpshort;
uint16 sample_volume; uint16 sample_volume = 0;
uint8 tmpchar; uint8 tmpchar;
Sample *sp; Sample *sp = 0;
uint8 sf2delay; uint8 sf2delay = 0;


#define READ_CHAR(thing) \ #define READ_CHAR(thing) \
if (1 != fread(&tmpchar, 1, 1, fp)) goto fail; \ if (1 != fread(&tmpchar, 1, 1, fp)) goto fail; \
Expand Down
10 changes: 0 additions & 10 deletions timidity/playmidi.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -40,18 +40,9 @@
#include "tables.h" #include "tables.h"




static int dont_cspline=0;
static int opt_dry = 1;
static int opt_expression_curve = 2; static int opt_expression_curve = 2;
static int opt_volume_curve = 2; static int opt_volume_curve = 2;
static int opt_stereo_surround = 0; static int opt_stereo_surround = 0;
static int dont_filter_melodic=1;
static int dont_filter_drums=1;
static int dont_chorus=0;
static int dont_reverb=0;
static int current_interpolation=1;
static int dont_keep_looping=0;
static int voice_reserve=0;




Channel channel[MAXCHAN]; Channel channel[MAXCHAN];
Expand Down Expand Up @@ -344,7 +335,6 @@ static void recompute_amp(int v)
int vol = channel[chan].volume; int vol = channel[chan].volume;
int expr = channel[chan].expression; int expr = channel[chan].expression;
int vel = vcurve[voice[v].velocity]; int vel = vcurve[voice[v].velocity];
int drumpan = NO_PANNING;
FLOAT_T curved_expression, curved_volume; FLOAT_T curved_expression, curved_volume;


if (channel[chan].kit) if (channel[chan].kit)
Expand Down
2 changes: 1 addition & 1 deletion wavestream.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ int WAVStream_PlaySome(Uint8 *stream, int len)
worksize = original_len*music->cvt.len_mult; worksize = original_len*music->cvt.len_mult;
music->cvt.buf=(Uint8 *)malloc(worksize); music->cvt.buf=(Uint8 *)malloc(worksize);
if ( music->cvt.buf == NULL ) { if ( music->cvt.buf == NULL ) {
return; return 0;
} }
music->cvt.len = original_len; music->cvt.len = original_len;
} }
Expand Down

0 comments on commit 9f06065

Please sign in to comment.