Browse Source

Fix unused{,-but-set}-variable compiler warnings.

tags/v1.9.13
Karl Linden Karl Lindén 7 years ago
parent
commit
dde9f29a8e
9 changed files with 15 additions and 44 deletions
  1. +0
    -12
      common/JackNetOneDriver.cpp
  2. +0
    -5
      example-clients/metro.c
  3. +0
    -2
      example-clients/midiseq.c
  4. +13
    -14
      linux/alsa/alsa_driver.c
  5. +1
    -2
      linux/alsa/alsa_seqmidi.c
  6. +0
    -3
      linux/alsa/hdsp.c
  7. +0
    -2
      posix/JackNetUnixSocket.cpp
  8. +1
    -2
      tests/cpu.c
  9. +0
    -2
      tests/test.cpp

+ 0
- 12
common/JackNetOneDriver.cpp View File

@@ -986,9 +986,6 @@ extern "C"
unsigned int latency = 5; unsigned int latency = 5;
unsigned int redundancy = 1; unsigned int redundancy = 1;
unsigned int mtu = 1400; unsigned int mtu = 1400;
#if HAVE_SAMPLERATE
unsigned int resample_factor_up = 1;
#endif
int dont_htonl_floats = 0; int dont_htonl_floats = 0;
int always_deadline = 0; int always_deadline = 0;
int jitter_val = 0; int jitter_val = 0;
@@ -1035,15 +1032,6 @@ extern "C"
#endif #endif
break; break;


case 'u':
#if HAVE_SAMPLERATE
resample_factor_up = param->value.ui;
#else
jack_error("not built with libsamplerate support");
return NULL;
#endif
break;

case 'b': case 'b':
bitdepth = param->value.ui; bitdepth = param->value.ui;
break; break;


+ 0
- 5
example-clients/metro.c View File

@@ -135,7 +135,6 @@ main (int argc, char *argv[])
int attack_percent = 1, decay_percent = 10, dur_arg = 100; int attack_percent = 1, decay_percent = 10, dur_arg = 100;
char *client_name = 0; char *client_name = 0;
char *bpm_string = "bpm"; char *bpm_string = "bpm";
int verbose = 0;
jack_status_t status; jack_status_t status;


const char *options = "f:A:D:a:d:b:n:thv"; const char *options = "f:A:D:a:d:b:n:thv";
@@ -150,7 +149,6 @@ main (int argc, char *argv[])
{"name", 1, 0, 'n'}, {"name", 1, 0, 'n'},
{"transport", 0, 0, 't'}, {"transport", 0, 0, 't'},
{"help", 0, 0, 'h'}, {"help", 0, 0, 'h'},
{"verbose", 0, 0, 'v'},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };


@@ -198,9 +196,6 @@ main (int argc, char *argv[])
client_name = (char *) malloc ((strlen (optarg) + 1) * sizeof (char)); client_name = (char *) malloc ((strlen (optarg) + 1) * sizeof (char));
strcpy (client_name, optarg); strcpy (client_name, optarg);
break; break;
case 'v':
verbose = 1;
break;
case 't': case 't':
transport_aware = 1; transport_aware = 1;
break; break;


+ 0
- 2
example-clients/midiseq.c View File

@@ -82,7 +82,6 @@ static int process(jack_nframes_t nframes, void *arg)
int main(int narg, char **args) int main(int narg, char **args)
{ {
int i; int i;
jack_nframes_t nframes;
if ((narg<6) || ((narg-3)%3 != 0)) { if ((narg<6) || ((narg-3)%3 != 0)) {
usage(); usage();
exit(1); exit(1);
@@ -93,7 +92,6 @@ int main(int narg, char **args)
} }
jack_set_process_callback (client, process, 0); jack_set_process_callback (client, process, 0);
output_port = jack_port_register (client, "out", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0); output_port = jack_port_register (client, "out", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0);
nframes = jack_get_buffer_size(client);
loop_index = 0; loop_index = 0;
num_notes = (narg - 3)/3; num_notes = (narg - 3)/3;
note_frqs = malloc(num_notes*sizeof(unsigned char)); note_frqs = malloc(num_notes*sizeof(unsigned char));


+ 13
- 14
linux/alsa/alsa_driver.c View File

@@ -625,7 +625,6 @@ alsa_driver_set_parameters (alsa_driver_t *driver,
channel_t chn; channel_t chn;
unsigned int pr = 0; unsigned int pr = 0;
unsigned int cr = 0; unsigned int cr = 0;
int err;


driver->frame_rate = rate; driver->frame_rate = rate;
driver->frames_per_cycle = frames_per_cycle; driver->frames_per_cycle = frames_per_cycle;
@@ -717,14 +716,14 @@ alsa_driver_set_parameters (alsa_driver_t *driver,
if (driver->playback_handle) { if (driver->playback_handle) {
snd_pcm_access_t access; snd_pcm_access_t access;


err = snd_pcm_hw_params_get_period_size (
driver->playback_hw_params, &p_period_size, &dir);
err = snd_pcm_hw_params_get_format (
driver->playback_hw_params,
&(driver->playback_sample_format));
err = snd_pcm_hw_params_get_access (driver->playback_hw_params,
snd_pcm_hw_params_get_period_size (
driver->playback_hw_params, &p_period_size, &dir);
snd_pcm_hw_params_get_format (
driver->playback_hw_params,
&(driver->playback_sample_format))
snd_pcm_hw_params_get_access (driver->playback_hw_params,
&access); &access);
driver->playback_interleaved =
driver->playback_interleaved =
(access == SND_PCM_ACCESS_MMAP_INTERLEAVED) (access == SND_PCM_ACCESS_MMAP_INTERLEAVED)
|| (access == SND_PCM_ACCESS_MMAP_COMPLEX); || (access == SND_PCM_ACCESS_MMAP_COMPLEX);


@@ -740,14 +739,14 @@ alsa_driver_set_parameters (alsa_driver_t *driver,
if (driver->capture_handle) { if (driver->capture_handle) {
snd_pcm_access_t access; snd_pcm_access_t access;


err = snd_pcm_hw_params_get_period_size (
driver->capture_hw_params, &c_period_size, &dir);
err = snd_pcm_hw_params_get_format (
driver->capture_hw_params,
snd_pcm_hw_params_get_period_size (
driver->capture_hw_params, &c_period_size, &dir);
snd_pcm_hw_params_get_format (
driver->capture_hw_params,
&(driver->capture_sample_format)); &(driver->capture_sample_format));
err = snd_pcm_hw_params_get_access (driver->capture_hw_params,
snd_pcm_hw_params_get_access (driver->capture_hw_params,
&access); &access);
driver->capture_interleaved =
driver->capture_interleaved =
(access == SND_PCM_ACCESS_MMAP_INTERLEAVED) (access == SND_PCM_ACCESS_MMAP_INTERLEAVED)
|| (access == SND_PCM_ACCESS_MMAP_COMPLEX); || (access == SND_PCM_ACCESS_MMAP_COMPLEX);




+ 1
- 2
linux/alsa/alsa_seqmidi.c View File

@@ -856,7 +856,6 @@ void do_jack_output(alsa_seqmidi_t *self, port_t *port, struct process_info* inf
int64_t frame_offset; int64_t frame_offset;
int64_t out_time; int64_t out_time;
snd_seq_real_time_t out_rt; snd_seq_real_time_t out_rt;
int err;


jack_midi_event_get(&jack_event, port->jack_buf, i); jack_midi_event_get(&jack_event, port->jack_buf, i);


@@ -896,7 +895,7 @@ void do_jack_output(alsa_seqmidi_t *self, port_t *port, struct process_info* inf
out_rt.tv_sec = out_time / NSEC_PER_SEC; out_rt.tv_sec = out_time / NSEC_PER_SEC;
snd_seq_ev_schedule_real(&alsa_event, self->queue, 0, &out_rt); snd_seq_ev_schedule_real(&alsa_event, self->queue, 0, &out_rt);


err = snd_seq_event_output(self->seq, &alsa_event);
snd_seq_event_output(self->seq, &alsa_event);
debug_log("alsa_out: written %d bytes to %s at %+d (%lld): %d", (int)jack_event.size, port->name, (int)frame_offset, out_time, err); debug_log("alsa_out: written %d bytes to %s at %+d (%lld): %d", (int)jack_event.size, port->name, (int)frame_offset, out_time, err);
} }
} }


+ 0
- 3
linux/alsa/hdsp.c View File

@@ -39,9 +39,6 @@ static const int hdsp_num_input_channels = 52;
static const int hdsp_physical_input_index[] = { static const int hdsp_physical_input_index[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25}; 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
static const int hdsp_audio_stream_index[] = {
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};


/* /*
* Use this array to choose the value of the output_channel * Use this array to choose the value of the output_channel


+ 0
- 2
posix/JackNetUnixSocket.cpp View File

@@ -111,8 +111,6 @@ namespace Jack
StrError(NET_ERROR_CODE); StrError(NET_ERROR_CODE);
} }
int tos = 0; /* see <netinet/in.h> */
/* /*
DSCP Field Hex/Bin/Dec Layer 2 Prio Traffic Type Acronym WMM Access Category DSCP Field Hex/Bin/Dec Layer 2 Prio Traffic Type Acronym WMM Access Category
0x38 / 111000 / 56 7 Network Control NC AC_VO 0x38 / 111000 / 56 7 Network Control NC AC_VO


+ 1
- 2
tests/cpu.c View File

@@ -78,10 +78,9 @@ int update_buffer_size(jack_nframes_t nframes, void *arg)


int process(jack_nframes_t nframes, void *arg) int process(jack_nframes_t nframes, void *arg)
{ {
jack_default_audio_sample_t *in, *out;
jack_default_audio_sample_t *out;
jack_nframes_t start_frame = jack_frame_time(client); jack_nframes_t start_frame = jack_frame_time(client);


in = (jack_default_audio_sample_t *) jack_port_get_buffer (input_port, nframes);
out = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port, nframes); out = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port, nframes);
memset(out, 0, sizeof (jack_default_audio_sample_t) * nframes); memset(out, 0, sizeof (jack_default_audio_sample_t) * nframes);




+ 0
- 2
tests/test.cpp View File

@@ -494,8 +494,6 @@ int process5(jack_nframes_t nframes, void *arg)
static jack_nframes_t first_current_frames; static jack_nframes_t first_current_frames;
static jack_time_t first_current_usecs; static jack_time_t first_current_usecs;
static jack_time_t first_next_usecs; static jack_time_t first_next_usecs;
static float first_period_usecs;
static int res1 = jack_get_cycle_times(client, &first_current_frames, &first_current_usecs, &first_next_usecs, &first_period_usecs);
jack_nframes_t current_frames; jack_nframes_t current_frames;
jack_time_t current_usecs; jack_time_t current_usecs;


Loading…
Cancel
Save