Skip to content

Commit f6571c4

Browse files
reukpierreguillot
authored andcommitted
JACK: Fix missing-prototype and unused-function warnings emitted by clang
Co-authored-by: Pierre Guillot <[email protected]>
1 parent 51a8a6d commit f6571c4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/juce_audio_devices/native/juce_JackAudio.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static void* juce_loadJackFunction (const char* const name)
5050
}
5151

5252
#define JUCE_DECL_JACK_FUNCTION(return_type, fn_name, argument_types, arguments) \
53-
return_type fn_name argument_types \
53+
static inline return_type fn_name argument_types \
5454
{ \
5555
using ReturnType = return_type; \
5656
typedef return_type (*fn_type) argument_types; \
@@ -60,7 +60,7 @@ static void* juce_loadJackFunction (const char* const name)
6060
}
6161

6262
#define JUCE_DECL_VOID_JACK_FUNCTION(fn_name, argument_types, arguments) \
63-
void fn_name argument_types \
63+
static inline void fn_name argument_types \
6464
{ \
6565
typedef void (*fn_type) argument_types; \
6666
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
8686
JUCE_DECL_JACK_FUNCTION (int, jack_connect, (jack_client_t* client, const char* source_port, const char* destination_port), (client, source_port, destination_port))
8787
JUCE_DECL_JACK_FUNCTION (const char*, jack_port_name, (const jack_port_t* port), (port))
8888
JUCE_DECL_JACK_FUNCTION (void*, jack_set_port_connect_callback, (jack_client_t* client, JackPortConnectCallback connect_callback, void* arg), (client, connect_callback, arg))
89-
JUCE_DECL_JACK_FUNCTION (jack_port_t* , jack_port_by_id, (jack_client_t* client, jack_port_id_t port_id), (client, port_id))
9089
JUCE_DECL_JACK_FUNCTION (int, jack_port_connected, (const jack_port_t* port), (port))
91-
JUCE_DECL_JACK_FUNCTION (int, jack_port_connected_to, (const jack_port_t* port, const char* port_name), (port, port_name))
9290
JUCE_DECL_JACK_FUNCTION (int, jack_set_xrun_callback, (jack_client_t* client, JackXRunCallback xrun_callback, void* arg), (client, xrun_callback, arg))
9391
JUCE_DECL_JACK_FUNCTION (int, jack_port_flags, (const jack_port_t* port), (port))
9492
JUCE_DECL_JACK_FUNCTION (jack_port_t*, jack_port_by_name, (jack_client_t* client, const char* name), (client, name))

0 commit comments

Comments
 (0)