Skip to content

fix(flatpak): Make the aja and linux-jack C helpers static (#2703) - #2717

Merged
zackees merged 5 commits into
masterfrom
fix/2703-aja-audio-repack-prototypes
Oct 28, 2026
Merged

zackees merged 5 commits into
masterfrom
fix/2703-aja-audio-repack-prototypes

Conversation

@zackees

@zackees zackees commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

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):

audio-repack.c.h:5:5: error: no previous prototype for 'check_buffer' [-Werror=missing-prototypes]
audio-repack.c.h:31:5: error: no previous prototype for 'repack_squash16'
audio-repack.c.h:66:5: error: no previous prototype for 'repack_squash_swap16'
audio-repack.c.h:88:5: error: no previous prototype for 'repack_squash32'
audio-repack.c.h:118:5: error: no previous prototype for 'repack_squash_swap32'

linux-jack (plugins/linux-jack/jack-wrapper.c.h, the next dispatch after aja):

jack-wrapper.c.h:56:5: error: no previous prototype for 'jack_process_callback' [-Werror=missing-prototypes]

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_func slot audio_repack_init assigns, the JACK callback through jack_init's jack_set_process_callback — so they are file-scope private and the fix is static, the shape #2710 used for gl_wayland_egl_windowinfo_create. The public entry points keep the prototypes their headers declare (audio-repack.h, jack-wrapper.h, obs-module.h).

Commits:

  • RED 2d7e5d17e: ci/test_aja_missing_prototypes.py — seven findings in the aja unit on master (the two scalar fallbacks are only compiled without USE_SIMD).
  • GREEN 2d1cd5880: eight aja definitions made static.
  • RED 220d02957: ci/test_linux_jack_missing_prototypes.py — one finding in the JACK unit on master.
  • GREEN 8227cd98f: jack_process_callback made static.

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 Scheduled dispatch on this head shows the Build 🧱 / Flatpak 📦 job compiling past these units; evidence lands in a comment.

@zackees zackees changed the title fix(aja): Make the audio-repack helpers static (#2703) fix(flatpak): Make the aja and linux-jack C helpers static (#2703) Oct 28, 2026
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.
@zackees
zackees force-pushed the fix/2703-aja-audio-repack-prototypes branch from 8227cd9 to 0cf95e4 Compare October 28, 2026 01:31
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Dispatch evidence: Scheduled Repository Actions run 40614011152 on 8227cd98f (the rebased head 0cf95e409 carries the same four commits; master's only delta since was #2716's Cargo.toml lint opt, which does not touch these lanes):

  • Build 🧱 / Flatpak 📦 — success (job 122572800771). The lane compiles past plugins/aja/audio-repack.c.h and plugins/linux-jack/jack-wrapper.c.h and finishes the full manifest build.
  • Build 🧱 / Ubuntu 🐧 (OBS-Studio-Rust) — success (job 122572800754).

That is the first green Flatpak app build on a head carrying these units. Local: ci.test_aja_missing_prototypes, ci.test_linux_jack_missing_prototypes, ci.test_platform_missing_prototypes and ci.test_scripting_missing_prototypes pass (5 tests OK); ruff format --check and ruff check clean on both new tests.

PR CI on the rebased head (0cf95e409) is running; this goes ready and into the queue when it is green.

The added `static` pushed the declaration past 120 columns; clang-format
22.1.3 rewraps it the way ./lint --fix does.
@zackees
zackees marked this pull request as ready for review October 28, 2026 01:51
@zackees
zackees added this pull request to the merge queue Oct 28, 2026
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

State: rebased onto origin/master (79d34d211, includes #2716), all PR checks green (14 pass / 22 path-skipped), marked ready, auto-merge on — merge-queue entry position 1, state AWAITING_CHECKS.

Branch head 8780febcd; the only post-dispatch commit is style(aja) re-wrapping the static shuffle_8ch signature that ./lint --fix produced. The app-lane evidence in the comment above is still the code under test (same four functional commits).

Merged via the queue into master with commit 25eb37b Oct 28, 2026
36 checks passed
@zackees
zackees deleted the fix/2703-aja-audio-repack-prototypes branch October 28, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant