Skip to content
Permalink
Browse files

Cleaned up compiler warnings

  • Loading branch information
slouken committed Oct 3, 2009
1 parent 39827e2 commit 9f06065306bb0a0c0f3be451d8418ca38d1cd855
Showing with 12 additions and 25 deletions.
  1. +1 −1 SDL_mixer.h
  2. +4 −7 music.c
  3. +6 −6 timidity/instrum.c
  4. +0 −10 timidity/playmidi.c
  5. +1 −1 wavestream.c
@@ -105,7 +105,7 @@ typedef enum {
MUS_OGG,
MUS_MP3,
MUS_MP3_MAD,
MUS_FLAC,
MUS_FLAC
} Mix_MusicType;

/* The internal format for a music chunk interpreted via mikmod */
11 music.c
@@ -1505,17 +1505,14 @@ BOOL LMM_Eof(struct MREADER *mr)
}
MODULE *MikMod_LoadSongRW(SDL_RWops *rw, int maxchan)
{
LMM_MREADER lmmmr={
LMM_Seek,
LMM_Tell,
LMM_Read,
LMM_Get,
LMM_Eof,
LMM_MREADER lmmmr = {
{ LMM_Seek, LMM_Tell, LMM_Read, LMM_Get, LMM_Eof },
0,
0,
rw
0
};
MODULE *m;
lmmmr.rw = rw;
lmmmr.offset=SDL_RWtell(rw);
SDL_RWseek(rw,0,SEEK_END);
lmmmr.eof=SDL_RWtell(rw);
@@ -255,7 +255,7 @@ static InstrumentLayer *load_instrument(char *name, int font_type, int percussio
int strip_loop, int strip_envelope,
int strip_tail, int bank, int gm_num, int sf_ix)
{
InstrumentLayer *lp, *lastlp, *headlp;
InstrumentLayer *lp, *lastlp, *headlp = 0;
Instrument *ip;
FILE *fp;
uint8 tmp[1024];
@@ -266,7 +266,7 @@ static InstrumentLayer *load_instrument(char *name, int font_type, int percussio
int sf2flag = 0;
int right_samples = 0;
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;

@@ -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++)
{
int sample_count;
int sample_count = 0;

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

#define READ_CHAR(thing) \
if (1 != fread(&tmpchar, 1, 1, fp)) goto fail; \
@@ -40,18 +40,9 @@
#include "tables.h"


static int dont_cspline=0;
static int opt_dry = 1;
static int opt_expression_curve = 2;
static int opt_volume_curve = 2;
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];
@@ -344,7 +335,6 @@ static void recompute_amp(int v)
int vol = channel[chan].volume;
int expr = channel[chan].expression;
int vel = vcurve[voice[v].velocity];
int drumpan = NO_PANNING;
FLOAT_T curved_expression, curved_volume;

if (channel[chan].kit)
@@ -192,7 +192,7 @@ int WAVStream_PlaySome(Uint8 *stream, int len)
worksize = original_len*music->cvt.len_mult;
music->cvt.buf=(Uint8 *)malloc(worksize);
if ( music->cvt.buf == NULL ) {
return;
return 0;
}
music->cvt.len = original_len;
}

0 comments on commit 9f06065

Please sign in to comment.