Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jack warnings #1499

Closed

Conversation

pierreguillot
Copy link

This PR fixes an issue posted on the JUCE forum concerning -Wmissing-prototypes warnings due to JACK (tested with Clang 10.0.0 & Ubuntu 20.04 - Clang 14.0.0 & Ubuntu 22.04.5 but warnings should appear on other OS.).

[295/300] Building CXX object CMakeFiles/Partiels.dir/JUCE/modules/juce_audio_devices/juce_audio_devices.cpp.o
In file included from /home/runner/work/Partiels/Partiels/JUCE/modules/juce_audio_devices/juce_audio_devices.cpp:264:
/home/runner/work/Partiels/Partiels/JUCE/modules/juce_audio_devices/native/juce_JackAudio.cpp:72:42: warning: no previous prototype for function 'jack_client_open' [-Wmissing-prototypes]
JUCE_DECL_JACK_FUNCTION (jack_client_t*, jack_client_open, (const char* client_name, jack_options_t options, jack_status_t* status, ...), (client_name, options, status))
                                         ^
/home/runner/work/Partiels/Partiels/JUCE/modules/juce_audio_devices/native/juce_JackAudio.cpp:72:26: note: declare 'static' if the function is not intended to be used outside of this translation unit
JUCE_DECL_JACK_FUNCTION (jack_client_t*, jack_client_open, (const char* client_name, jack_options_t options, jack_status_t* status, ...), (client_name, options, status))
...

Github Action
job-logs.txt

The commit 784ff78 declares the JACK methods as static to avoid these warnings. Two methods are only used in Debug mode, so they generate the -Wunused-function warning in Release mode. The second commit c5eb15a corrects this problem by declaring them Debug-only.

@reuk
Copy link
Member

reuk commented Jan 13, 2025

Thanks, that's merged here: 08fcb74

@reuk reuk closed this Jan 13, 2025
@pierreguillot pierreguillot deleted the fix/jack-warnings branch January 14, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants