Repository navigation
fix(flatpak): Make the aja and linux-jack C helpers static (#2703) - #2717
Conversation
RED: ci/test_aja_missing_prototypes.py fails on master with seven file-scope definitions in plugins/aja/audio-repack.c.h that are neither static nor declared in the plugin's headers. The Flatpak app build is the only lane that compiles them and it stops at audio-repack.c.h:5: error: no previous prototype for 'check_buffer' [-Werror=missing-prototypes]
GREEN: check_buffer, the four SIMD repack functions and the two scalar fallbacks are reached only through audio_repack_init's repack_func slot in this unity group, so they are file-scope private. audio_repack_init and audio_repack_free keep their prototypes in audio-repack.h. This clears the next -Wmissing-prototypes failure the Flatpak app lane hits after #2710 and #2712: the lane compiles past the audio repack unit instead of stopping there.
RED: ci/test_linux_jack_missing_prototypes.py fails on master with plugins/linux-jack/jack-wrapper.c.h:56: jack_process_callback a file-scope definition that is neither static nor declared in a header. The Flatpak app build is the only lane that compiles the JACK plugin and it stops there with -Werror=missing-prototypes.
GREEN: jack_process_callback is the jack_set_process_callback argument used only by jack_init in the same translation unit, so it is file-scope private. jack_init and deactivate_jack keep the prototypes jack-wrapper.h declares.
8227cd9 to
0cf95e4
Compare
|
Dispatch evidence:
That is the first green Flatpak app build on a head carrying these units. Local: PR CI on the rebased head ( |
The added `static` pushed the declaration past 120 columns; clang-format 22.1.3 rewraps it the way ./lint --fix does.
|
Handed off to the coordinator. State: rebased onto Branch head |
Refs #2703.
The Flatpak app lane on master (run 40609538644) stops in first-party plugin C once #2710 and #2712 clear the earlier sites. The PR lanes never build these plugins, so each diagnostic only appears in a
Scheduled/release dispatch, one translation unit at a time.aja (
plugins/aja/audio-repack.c.h, job 122557522812):linux-jack (
plugins/linux-jack/jack-wrapper.c.h, the next dispatch after aja):None of these is generated code, so the #2704 exemption does not reach them. Every one is reached only inside its own translation unit — the aja helpers through the
repack_funcslotaudio_repack_initassigns, the JACK callback throughjack_init'sjack_set_process_callback— so they are file-scope private and the fix isstatic, the shape #2710 used forgl_wayland_egl_windowinfo_create. The public entry points keep the prototypes their headers declare (audio-repack.h,jack-wrapper.h,obs-module.h).Commits:
2d7e5d17e:ci/test_aja_missing_prototypes.py— seven findings in the aja unit on master (the two scalar fallbacks are only compiled withoutUSE_SIMD).2d1cd5880: eight aja definitions madestatic.220d02957:ci/test_linux_jack_missing_prototypes.py— one finding in the JACK unit on master.8227cd98f:jack_process_callbackmadestatic.Local: all five prototype tests pass (
ci.test_aja_missing_prototypes,ci.test_linux_jack_missing_prototypes,ci.test_platform_missing_prototypes,ci.test_scripting_missing_prototypes), ruff format and check clean.The draft stays until a
Scheduleddispatch on this head shows theBuild 🧱 / Flatpak 📦job compiling past these units; evidence lands in a comment.