Fix a few compiler warnings

Like e g "variable z set but never used".
This commit is contained in:
David Henningsson 2012-09-23 09:08:45 +00:00
parent 3d9f821954
commit 05acefb59c
5 changed files with 18 additions and 10 deletions

View file

@ -295,7 +295,9 @@ int main(int argc, char** argv)
int with_server = 0;
int dump = 0;
int fast_render = 0;
#ifdef LASH_ENABLED
int connect_lash = 1;
#endif
char *optchars = "a:C:c:dE:f:F:G:g:hijK:L:lm:nO:o:p:R:r:sT:Vvz:";
#ifdef LASH_ENABLED
int enabled_lash = 0; /* set to TRUE if lash gets enabled */
@ -461,7 +463,9 @@ int main(int argc, char** argv)
fluid_settings_setint(settings, "synth.audio-channels", audio_channels);
break;
case 'l': /* disable LASH */
#ifdef LASH_ENABLED
connect_lash = 0;
#endif
break;
case 'm':
if (FLUID_STRCMP (optarg, "help") == 0)

View file

@ -437,7 +437,7 @@ fluid_midi_file_read_event(fluid_midi_file *mf, fluid_track_t *track)
unsigned char *metadata = NULL;
unsigned char *dyn_buf = NULL;
unsigned char static_buf[256];
int nominator, denominator, clocks, notes, sf, mi;
int nominator, denominator, clocks, notes;
fluid_midi_event_t *evt;
int channel = 0;
int param1 = 0;
@ -654,8 +654,9 @@ fluid_midi_file_read_event(fluid_midi_file *mf, fluid_track_t *track)
result = FLUID_FAILED;
break;
}
sf = metadata[0];
mi = metadata[1];
/* We don't care about key signatures anyway */
/* sf = metadata[0];
mi = metadata[1]; */
break;
case MIDI_SEQUENCER_EVENT:

View file

@ -579,7 +579,7 @@ fluid_defpreset_noteon(fluid_defpreset_t* preset, fluid_synth_t* synth, int chan
{
fluid_preset_zone_t *preset_zone, *global_preset_zone;
fluid_inst_t* inst;
fluid_inst_zone_t *inst_zone, *global_inst_zone, *z;
fluid_inst_zone_t *inst_zone, *global_inst_zone;
fluid_sample_t* sample;
fluid_voice_t* voice;
fluid_mod_t * mod;
@ -625,8 +625,6 @@ fluid_defpreset_noteon(fluid_defpreset_t* preset, fluid_synth_t* synth, int chan
}
z = inst_zone;
/* Instrument level, generators */
for (i = 0; i < GEN_LAST; i++) {

View file

@ -889,7 +889,7 @@ fluid_rampreset_noteon (fluid_rampreset_t* preset, fluid_synth_t* synth, int cha
{
fluid_preset_zone_t *preset_zone;
fluid_inst_t* inst;
fluid_inst_zone_t *inst_zone, *global_inst_zone, *z;
fluid_inst_zone_t *inst_zone, *global_inst_zone;
fluid_sample_t* sample;
fluid_voice_t* voice;
fluid_mod_t * mod;
@ -936,8 +936,6 @@ fluid_rampreset_noteon (fluid_rampreset_t* preset, fluid_synth_t* synth, int cha
return FLUID_FAILED;
}
z = inst_zone;
/* Instrument level, generators */
for (i = 0; i < GEN_LAST; i++) {

View file

@ -2371,7 +2371,10 @@ fluid_synth_nwrite_float(fluid_synth_t* synth, int len,
fluid_real_t** left_in;
fluid_real_t** right_in;
double time = fluid_utime();
int i, num, available, count, bytes;
int i, num, available, count;
#ifdef WITH_FLOAT
int bytes;
#endif
float cpu_load;
if (!synth->eventhandler->is_threadsafe)
@ -2385,7 +2388,9 @@ fluid_synth_nwrite_float(fluid_synth_t* synth, int len,
fluid_rvoice_mixer_get_bufs(synth->eventhandler->mixer, &left_in, &right_in);
num = (available > len)? len : available;
#ifdef WITH_FLOAT
bytes = num * sizeof(float);
#endif
for (i = 0; i < synth->audio_channels; i++) {
#ifdef WITH_FLOAT
@ -2410,7 +2415,9 @@ fluid_synth_nwrite_float(fluid_synth_t* synth, int len,
fluid_rvoice_mixer_get_bufs(synth->eventhandler->mixer, &left_in, &right_in);
num = (FLUID_BUFSIZE > len - count)? len - count : FLUID_BUFSIZE;
#ifdef WITH_FLOAT
bytes = num * sizeof(float);
#endif
for (i = 0; i < synth->audio_channels; i++) {
#ifdef WITH_FLOAT