From b49629d7222bcdf237c9f7f998e25a92eddab345 Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Fri, 3 Nov 2023 11:17:10 +0100 Subject: [PATCH] Fix compiler warnings --- meson.build | 5 +++-- meson_options.txt | 2 +- patchmatrix/patchmatrix.h | 16 ++++++---------- src/patchmatrix_mixer.c | 4 ++-- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 51e9daf..2838878 100644 --- a/meson.build +++ b/meson.build @@ -62,8 +62,9 @@ incs = [jackey_inc, osc_inc] c_args = [ '-fvisibility=hidden', - '-ffast-math' -] + '-ffast-math', + '-Wno-unused-parameter', + '-Wno-unused-function'] dsp_srcs = [ join_paths('src', 'patchmatrix.c'), diff --git a/meson_options.txt b/meson_options.txt index 9e9cfef..7c0339a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,4 +5,4 @@ option('build-tests', type : 'boolean', value : true) -option('version', type : 'string', value : '0.27.23') +option('version', type : 'string', value : '0.27.35') diff --git a/patchmatrix/patchmatrix.h b/patchmatrix/patchmatrix.h index 95acc2c..3a13af7 100644 --- a/patchmatrix/patchmatrix.h +++ b/patchmatrix/patchmatrix.h @@ -54,10 +54,6 @@ #define PORT_MAX 128 -typedef enum _event_type_t event_type_t; -typedef enum _port_type_t port_type_t; -typedef enum _port_designation_t port_designation_t; - typedef struct _hash_t hash_t; typedef struct _port_conn_t port_conn_t; typedef struct _client_conn_t client_conn_t; @@ -68,7 +64,7 @@ typedef struct _client_t client_t; typedef struct _app_t app_t; typedef struct _event_t event_t; -enum _event_type_t { +typedef enum _event_type_t { EVENT_CLIENT_REGISTER, EVENT_PORT_REGISTER, EVENT_PORT_CONNECT, @@ -84,9 +80,9 @@ enum _event_type_t { #ifdef JACK_HAS_METADATA_API EVENT_PROPERTY_CHANGE, #endif -}; +} event_type_t; -enum _port_type_t { +typedef enum _port_type_t { TYPE_NONE = (0 << 0), TYPE_AUDIO = (1 << 0), TYPE_MIDI = (1 << 1), @@ -94,9 +90,9 @@ enum _port_type_t { TYPE_OSC = (1 << 2), TYPE_CV = (1 << 3) #endif -}; +} port_type_t; -enum _port_designation_t { +typedef enum _port_designation_t { DESIGNATION_NONE = 0, DESIGNATION_LEFT, DESIGNATION_RIGHT, @@ -112,7 +108,7 @@ enum _port_designation_t { DESIGNATION_LOW_FREQUENCY_EFFECTS, DESIGNATION_MAX -}; +} port_designation_t; struct _hash_t { void **nodes; diff --git a/src/patchmatrix_mixer.c b/src/patchmatrix_mixer.c index 154e567..b5fec47 100644 --- a/src/patchmatrix_mixer.c +++ b/src/patchmatrix_mixer.c @@ -318,13 +318,13 @@ _midi_mixer_process(jack_nframes_t nframes, void *arg) } } - if(I == -1) // no more events to process from all sinks + if(I < 0) // no more events to process from all sinks break; jack_midi_event_t ev; jack_midi_event_get(&ev, psinks[I], pos[I]); - if(I == shm->nsinks) // automation port + if((unsigned)I == shm->nsinks) // automation port { _autom_handle(mixer, &ev); } -- 2.38.5