Browse Source

fix compile warnings

gcc (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4363 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
nedko 12 years ago
parent
commit
08876bd6eb
8 changed files with 27 additions and 35 deletions
  1. +12
    -25
      common/JackAudioAdapterInterface.cpp
  2. +1
    -0
      common/netjack.c
  3. +1
    -0
      common/netjack_packet.c
  4. +7
    -7
      example-clients/midi_latency_test.c
  5. +2
    -0
      example-clients/server_control.cpp
  6. +1
    -0
      linux/alsa/alsa_driver.c
  7. +1
    -1
      linux/alsarawmidi/JackALSARawMidiPort.cpp
  8. +2
    -2
      tests/test.cpp

+ 12
- 25
common/JackAudioAdapterInterface.cpp View File

@@ -46,7 +46,6 @@ namespace Jack

void MeasureTable::Save(unsigned int fHostBufferSize, unsigned int fHostSampleRate, unsigned int fAdaptedSampleRate, unsigned int fAdaptedBufferSize)
{
char buffer[1024];
FILE* file = fopen("JackAudioAdapter.log", "w");

int max = (fCount) % TABLE_MAX - 1;
@@ -68,10 +67,8 @@ namespace Jack
fprintf(file, "set xlabel \"audio cycles\"\n");
fprintf(file, "set ylabel \"frames\"\n");
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 2 title \"Ringbuffer error\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 3 title \"Ringbuffer error with timing correction\" with lines");
fprintf(file, buffer);
fprintf(file, "\"JackAudioAdapter.log\" using 2 title \"Ringbuffer error\" with lines,");
fprintf(file, "\"JackAudioAdapter.log\" using 3 title \"Ringbuffer error with timing correction\" with lines");

fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming1.svg\n");
@@ -84,10 +81,8 @@ namespace Jack
fprintf(file, "set xlabel \"audio cycles\"\n");
fprintf(file, "set ylabel \"frames\"\n");
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 2 title \"Consumer interrupt period\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 3 title \"Producer interrupt period\" with lines\n");
fprintf(file, buffer);
fprintf(file, "\"JackAudioAdapter.log\" using 2 title \"Consumer interrupt period\" with lines,");
fprintf(file, "\"JackAudioAdapter.log\" using 3 title \"Producer interrupt period\" with lines\n");
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");

@@ -102,10 +97,8 @@ namespace Jack
fprintf(file, "set xlabel \"audio cycles\"\n");
fprintf(file, "set ylabel \"resampling ratio\"\n");
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 4 title \"Ratio 1\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines");
fprintf(file, buffer);
fprintf(file, "\"JackAudioAdapter.log\" using 4 title \"Ratio 1\" with lines,");
fprintf(file, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines");

fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming2.svg\n");
@@ -118,10 +111,8 @@ namespace Jack
fprintf(file, "set xlabel \"audio cycles\"\n");
fprintf(file, "set ylabel \"resampling ratio\"\n");
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 4 title \"Ratio 1\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines\n");
fprintf(file, buffer);
fprintf(file, "\"JackAudioAdapter.log\" using 4 title \"Ratio 1\" with lines,");
fprintf(file, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines\n");
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");

@@ -136,10 +127,8 @@ namespace Jack
fprintf(file, "set xlabel \"audio cycles\"\n");
fprintf(file, "set ylabel \"frames\"\n");
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 6 title \"Frames position in consumer ringbuffer\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines");
fprintf(file, buffer);
fprintf(file, "\"JackAudioAdapter.log\" using 6 title \"Frames position in consumer ringbuffer\" with lines,");
fprintf(file, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines");

fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming3.svg\n");
@@ -152,10 +141,8 @@ namespace Jack
fprintf(file, "set xlabel \"audio cycles\"\n");
fprintf(file, "set ylabel \"frames\"\n");
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 6 title \"Frames position in consumer ringbuffer\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines\n");
fprintf(file, buffer);
fprintf(file, "\"JackAudioAdapter.log\" using 6 title \"Frames position in consumer ringbuffer\" with lines,");
fprintf(file, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines\n");
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");



+ 1
- 0
common/netjack.c View File

@@ -57,6 +57,7 @@ $Id: net_driver.c,v 1.17 2006/04/16 20:16:10 torbenh Exp $

#include "netjack.h"
#include "netjack_packet.h"
#include "JackError.h"

#define MIN(x,y) ((x)<(y) ? (x) : (y))



+ 1
- 0
common/netjack_packet.c View File

@@ -73,6 +73,7 @@
#endif

#include "netjack_packet.h"
#include "JackError.h"

#ifdef NO_JACK_ERROR
#define jack_error printf


+ 7
- 7
example-clients/midi_latency_test.c View File

@@ -866,36 +866,36 @@ main(int argc, char **argv)
printf("\nJitter Plot:\n");
for (i = 0; i < 100; i++) {
if (jitter_plot[i]) {
printf("%.1f - %.1f ms: %u\n", ((float) i) / 10.0,
printf("%.1f - %.1f ms: %zu\n", ((float) i) / 10.0,
((float) (i + 1)) / 10.0, jitter_plot[i]);
}
}
if (jitter_plot[100]) {
printf(" > 10 ms: %u\n", jitter_plot[100]);
printf(" > 10 ms: %zu\n", jitter_plot[100]);
}
printf("\nLatency Plot:\n");
for (i = 0; i < 100; i++) {
if (latency_plot[i]) {
printf("%.1f - %.1f ms: %u\n",
printf("%.1f - %.1f ms: %zu\n",
latency_plot_offset + (((float) i) / 10.0),
latency_plot_offset + (((float) (i + 1)) / 10.0),
latency_plot[i]);
}
}
if (latency_plot[100]) {
printf(" > %.1f ms: %u\n", latency_plot_offset + 10.0,
printf(" > %.1f ms: %zu\n", latency_plot_offset + 10.0,
latency_plot[100]);
}
}
deactivate_client:
jack_deactivate(client);
printf("\nMessages sent: %d\nMessages received: %d\n", messages_sent,
printf("\nMessages sent: %zu\nMessages received: %zu\n", messages_sent,
messages_received);
if (unexpected_messages) {
printf("Unexpected messages received: %d\n", unexpected_messages);
printf("Unexpected messages received: %zu\n", unexpected_messages);
}
if (xrun_count) {
printf("Xruns: %d\n", xrun_count);
printf("Xruns: %zu\n", xrun_count);
}
destroy_process_semaphore:
destroy_semaphore(process_semaphore, 2);


+ 2
- 0
example-clients/server_control.cpp View File

@@ -53,6 +53,7 @@ static jackctl_internal_t * jackctl_server_get_internal(jackctl_server_t *server
return NULL;
}

#if 0
static jackctl_parameter_t *
jackctl_get_parameter(
const JSList * parameters_list,
@@ -70,6 +71,7 @@ jackctl_get_parameter(

return NULL;
}
#endif

static void print_value(union jackctl_parameter_value value, jackctl_param_type_t type)
{


+ 1
- 0
linux/alsa/alsa_driver.c View File

@@ -20,6 +20,7 @@


#define __STDC_FORMAT_MACROS // For inttypes.h to work in C++
#define _GNU_SOURCE /* for strcasestr() from string.h */

#include <math.h>
#include <stdio.h>


+ 1
- 1
linux/alsarawmidi/JackALSARawMidiPort.cpp View File

@@ -116,7 +116,7 @@ JackALSARawMidiPort::JackALSARawMidiPort(snd_rawmidi_info_t *info,
snprintf(alias, sizeof(alias), "system:%d-%d %s %d %s", card + 1,
device + 1, snd_rawmidi_info_get_name(info), subdevice + 1,
alias_suffix);
snprintf(name, sizeof(name), "%s%d", name_prefix, index + 1);
snprintf(name, sizeof(name), "%s%zu", name_prefix, index + 1);
this->io_mask = io_mask;
return;
free_params:


+ 2
- 2
tests/test.cpp View File

@@ -647,7 +647,7 @@ int main (int argc, char *argv[])
&status, "inprocess", "");

if (intclient == 0 || status & JackFailure) {
printf("!!! ERROR !!! cannot load internal client \"inprocess\" intclient %d status 0x%2.0x !\n", intclient, status);
printf("!!! ERROR !!! cannot load internal client \"inprocess\" intclient 0x%llX status 0x%2.0x !\n", (unsigned long long)intclient, status);
} else {

Log("\"inprocess\" server internal client loaded\n");
@@ -663,7 +663,7 @@ int main (int argc, char *argv[])
if (intclient1 == intclient) {
Log("jack_internal_client_handle returns correct handle\n");
} else {
printf("!!! ERROR !!! jack_internal_client_handle returns incorrect handle %d\n", intclient1);
printf("!!! ERROR !!! jack_internal_client_handle returns incorrect handle 0x%llX\n", (unsigned long long)intclient1);
}

// Unload internal client


Loading…
Cancel
Save