From f6571c434edf4c77714dabd4bdb6ca0c8132b366 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 13 Jan 2025 11:48:08 +0000 Subject: [PATCH] JACK: Fix missing-prototype and unused-function warnings emitted by clang Co-authored-by: Pierre Guillot --- modules/juce_audio_devices/native/juce_JackAudio.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/juce_audio_devices/native/juce_JackAudio.cpp b/modules/juce_audio_devices/native/juce_JackAudio.cpp index ac3dd912f7..34f5a6aceb 100644 --- a/modules/juce_audio_devices/native/juce_JackAudio.cpp +++ b/modules/juce_audio_devices/native/juce_JackAudio.cpp @@ -50,7 +50,7 @@ static void* juce_loadJackFunction (const char* const name) } #define JUCE_DECL_JACK_FUNCTION(return_type, fn_name, argument_types, arguments) \ - return_type fn_name argument_types \ + static inline return_type fn_name argument_types \ { \ using ReturnType = return_type; \ typedef return_type (*fn_type) argument_types; \ @@ -60,7 +60,7 @@ static void* juce_loadJackFunction (const char* const name) } #define JUCE_DECL_VOID_JACK_FUNCTION(fn_name, argument_types, arguments) \ - void fn_name argument_types \ + static inline void fn_name argument_types \ { \ typedef void (*fn_type) argument_types; \ static fn_type fn = (fn_type) juce_loadJackFunction (#fn_name); \ @@ -86,9 +86,7 @@ JUCE_DECL_JACK_FUNCTION (const char**, jack_get_ports, (jack_client_t* client, c JUCE_DECL_JACK_FUNCTION (int, jack_connect, (jack_client_t* client, const char* source_port, const char* destination_port), (client, source_port, destination_port)) JUCE_DECL_JACK_FUNCTION (const char*, jack_port_name, (const jack_port_t* port), (port)) JUCE_DECL_JACK_FUNCTION (void*, jack_set_port_connect_callback, (jack_client_t* client, JackPortConnectCallback connect_callback, void* arg), (client, connect_callback, arg)) -JUCE_DECL_JACK_FUNCTION (jack_port_t* , jack_port_by_id, (jack_client_t* client, jack_port_id_t port_id), (client, port_id)) JUCE_DECL_JACK_FUNCTION (int, jack_port_connected, (const jack_port_t* port), (port)) -JUCE_DECL_JACK_FUNCTION (int, jack_port_connected_to, (const jack_port_t* port, const char* port_name), (port, port_name)) JUCE_DECL_JACK_FUNCTION (int, jack_set_xrun_callback, (jack_client_t* client, JackXRunCallback xrun_callback, void* arg), (client, xrun_callback, arg)) JUCE_DECL_JACK_FUNCTION (int, jack_port_flags, (const jack_port_t* port), (port)) JUCE_DECL_JACK_FUNCTION (jack_port_t*, jack_port_by_name, (jack_client_t* client, const char* name), (client, name))