You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
build(cmake): Drop -Wno-missing-prototypes and -Wno-strict-prototypes #2624
Part of #516 (maximum C/C++ warning strictness). Split out because #516 is size:XL and the Definition of Ready splits an XL issue into sub-issues before it is claimed. The other four parts are linked from #516.
Gap: the pins still hide the categories this issue names. -Wno-missing-prototypes at cmake/common/compiler_common.cmake:25 and cmake/linux/compilerconfig.cmake:69; -Wno-strict-prototypes at compiler_common.cmake:56. STRICT_FLAGS in rust/obs-c-oracle/build.rs already carries the positive forms, so the C the Rust workspace builds is ahead of the CMake build here.
RED: add -Wmissing-prototypes -Wstrict-prototypes to the CMake C flag lists (or drop the -Wno-* pins) and build the Linux Tier 2 tree; the first undeclared prototype is the RED state.
Acceptance criteria:
The Linux and macOS CMake builds are clean with neither -Wno-missing-prototypes nor -Wno-strict-prototypes in any flag list.
The remaining functions are declared before use (a static declaration or a header prototype); no function is silenced with a per-file -Wno-*.
No regression in the -Werror behaviour: a new missing prototype fails the build.
Claiming: build(cmake): Drop -Wno-missing-prototypes and -Wno-strict-prototypes
Plan (one PR):
RED: delete -Wno-missing-prototypes / -Wno-strict-prototypes from the CMake C flag lists (cmake/common/compiler_common.cmake:25,56, cmake/linux/compilerconfig.cmake:69) and build the Linux Tier 2 CMake tree; the first undeclared prototype is the RED state. Record the command and the first finding.
GREEN: declare each remaining function before use (a static declaration or a header prototype) — no per-file -Wno-*. If the volume in one directory is large, keep the flag list as the single switch and land the fixes in this PR.
Verify: Linux CMake build clean with neither pin present anywhere; ./lint; PR CI's macOS/cross lane covers the macOS half (no macOS host here).
Progress (branch infra/2624-missing-prototypes, pushed; no PR yet — GREEN incomplete).
RED reproduced. With the two pins removed and the positive forms added to the C-only lists (cmake/common/compiler_common.cmake_obs_clang_c_options; cmake/linux/compilerconfig.cmake GNU C line), uv run ci/local_gate.py --lane tier2-linux (gcc 15.2) fails with 228 -Werror= findings across ~75 files:
area
findings
test/cmocka/*.c (the C tests themselves)
97
plugins/* (incl. vendored rnnoise 6, librtmp 5)
84
libobs/*
35
shared/*
11
deps/*
1
First reported finding: libobs/graphics/effect.c.h:20: no previous prototype for 'gs_effect_actually_destroy'.
Done so far (88bd4a43): the eight libobs/libobs-opengl missing-prototype functions are now declared before their definition (the unity group no longer sees the prototype only from a later file), the three () definitions/declarations get (void), and the vendored-dep exemptions are extended (glad's -Wno-strict-prototypes target option gains GNU; libcaption gains -Wno-missing-prototypes beside the -Wno-strict-prototypes it already had). Re-running the lane then surfaces the 228 above.
Question before I spend the rest of the wat: the flags are global, so they also reach the test/cmocka C tests (97 findings) and the vendored trees. Never edit an existing C test conflicts with no per-file -Wno-* if the two flags stay in the shared flag lists. Prefer:
fix the C tests' own helper prototypes too (behaviour-neutral: a prototype or (void) on a test-local helper changes no assertion), or
keep the flags on the product targets and leave the test/cmocka executables on the current flags?
I'll take (1) as the default and continue on the product code unless you say otherwise — that is the reading where the acceptance ("no function is silenced") still holds.
Decision needed: how the test/cmocka C tests (and vendored trees) are treated by this flag drop.
The RED is reproduced and the direction is stuck on a genuine rule collision. Removing -Wno-missing-prototypes / -Wno-strict-prototypes from the global CMake C flag lists reaches every C translation unit, including the cmocka tests: uv run ci/local_gate.py --lane tier2-linux (gcc 15.2) then reports 228 -Werror= findings across ~75 files:
area
findings
test/cmocka/*.c (the C tests themselves)
97
plugins/* (incl. vendored rnnoise 6, librtmp 5)
84
libobs/*
35
shared/*
11
deps/*
1
The acceptance criteria ("no -Wno-* in any flag list", "the remaining functions are declared before use") require the 97 test findings be declared too, but that means editing an existing C test, which AGENTS.md / the worker checklist forbid ("Never edit an existing C test"). Vendored deps already have the target-scoped exemption precedent from #516 (extend those, do not touch their sources) — but a -Wno-* on the test targets would still be "in a flag list".
Options:
Fix the test helpers too (make the non-static cmocka helpers static, or declare them before use) — a behaviour-neutral edit to the test files, satisfying both acceptance criteria. This is what build(cmake): Compile C with -Wpedantic (deps/glad exempt) #2623 (-Wpedantic) already does (test/cmocka/test_audio_buffering_subsample.c, config_close_fault.c, test_graphics_host_functions.c, test_output_end_capture_thread_join.c), so it is the consistent reading; the "never edit a C test" rule reads as "don't weaken an assertion to pass a port".
Scope the two positive flags to the first-party product targets only (libobs, plugins, shared) instead of the global C lists, so the test executables simply never receive them — nothing is silenced and no test is edited, at the cost of the cmocka C no longer being checked.
My recommendation is (1): it is the only option that satisfies both acceptance criteria, it is behaviour-neutral, and it matches what this series already does for -Wpedantic. I will take it unless told otherwise — the product-code fixes are independent of this and continue either way.
State so far: branch infra/2624-missing-prototypes is pushed. 88bd4a43 declares the eight libobs/libobs-opengl functions before their definitions, changes three () definitions to (void), and extends the vendored-dep exemptions (glad gains GNU -Wno-strict-prototypes, libcaption gains -Wno-missing-prototypes). No PR yet — GREEN is incomplete pending this decision on scope.
Decided: take option 2 — exempt the test/cmocka test tree with a target-scoped option and do not edit any C test. Option 1's premise is factually wrong: #2623 does not edit test sources.
Why not option 1. AGENTS.md:122 and .claude/skills/obs-worker/SKILL.md:120 say "Never edit existing C tests or public C headers to make a port pass." The maintainer's own in-flight PR for the sibling ratchet, #2643 (-Wpedantic, #2623), resolves the identical collision without touching a single test source: its only test/ change is test/cmocka/CMakeLists.txt, adding
# Existing C tests are never edited to satisfy a new warning, and -Wpedantic# rejects the ISO-C extensions they and the vendored librtmp sources some of# them compile rely on ...add_compile_options($<$<COMPILE_LANG_AND_ID:C,AppleClang,Clang,GNU>:-Wno-pedantic>)
#2643's full file list has no test/cmocka/*.c (the four files the issue names — test_audio_buffering_subsample.c, config_close_fault.c, test_graphics_host_functions.c, test_output_end_capture_thread_join.c — are not in it). So "the consistent reading" points the other way: the rule is absolute for a new warning, and the exemption lives in the test tree's own CMakeLists.txt.
That mechanism already exists here.test/cmocka/CMakeLists.txt carries three of these today, each target-scoped and under the comment # Existing C tests are never edited (obs-rust/obs-studio#516).: -Wno-shadow, -Wno-cast-qual, -Wno-format-nonliteral. Adding -Wno-missing-prototypes;-Wno-strict-prototypes beside them, with a comment citing #516/#2624 and the same "existing C tests are never edited" reason, is the fourth application of the rule, not a new exception.
How the acceptance criteria are then read (say which you did in the PR body):
"no -Wno-missing-prototypes / -Wno-strict-prototypes in any flag list" means the product flag lists: cmake/common/compiler_common.cmake (_obs_clang_c_options, and the GNU C line), cmake/linux/compilerconfig.cmake, cmake/macos/compilerconfig.cmake, cmake/windows/compilerconfig.cmake. Both pins leave all of them.
The only place either -Wno-* may appear afterwards is a target-scoped exemption with a comment naming the reason: test/cmocka/CMakeLists.txt (the test executables) and the vendored trees build(cmake): compile C with -Wpedantic (#2623) #2643 already exempts (deps/glad, deps/libcaption, and rnnoise/librtmp for the plugins/* findings). Extend those target options; do not edit their sources.
Everything first-party stays fully checked: the libobs/*, libobs-opengl/*, shared/*, first-party plugins/* and frontend C findings are real and must be fixed with declarations before use / (void) / static, not silenced. That is the ~131 non-test findings; the work already done on infra/2624-missing-prototypes (88bd4a43) stays.
Never edit an existing C test, even mechanically (no static, no forward declarations). Option 3 is rejected too: pushing the two positive flags into per-target lists makes the flag lists diverge per target and quietly stops checking any first-party target someone forgets to list.
The two rules no longer collide: the product code gets the strict pair, the reference test tree keeps its existing exemption mechanism. This is a build-tooling change with no user-visible behaviour, so no docs/features.md line.
Sources: AGENTS.md:122, .claude/skills/obs-worker/SKILL.md:120, #2643 (-Wpedantic, #2623) test/cmocka/CMakeLists.txt hunk, the existing -Wno-shadow/-Wno-cast-qual/-Wno-format-nonliteral lines in test/cmocka/CMakeLists.txt, #516.
If you disagree with reading the "no -Wno-* in any flag list" criterion as product-only, say so and I will re-scope this to option 3 — the product-code fixes in 88bd4a43 are independent of it either way.
Backfill found by the dispatched Ubuntu 🐧 (OBS-Studio-Rust) lane after #2703 exempted the SWIG-generated shared/obs-scripting sources: with that target compiling again, the same lane stops in first-party code, so this is a #2678 gap rather than another generated-file case.
Evidence
Scheduled Repository Actions on infra/2703-scripting-missing-prototypes at ec608e33 (run 40595018476, job 122510595427):
shared/obs-scripting: 9 C objects compiled (no diagnostics with the #2703 exemption)
libobs-opengl/gl-wayland-egl.c.h:90:23: error: no previous prototype for 'gl_wayland_egl_windowinfo_create' [-Werror=missing-prototypes]
ninja: build stopped: subcommand failed.
gl_wayland_egl_windowinfo_create is defined at libobs-opengl/gl-wayland-egl.c.h:90 with no declaration before it in that translation unit (libobs-opengl/gl-wayland-egl.h declares the gl_windowinfo struct and gl_wayland_egl_windowinfo_destroy, not this constructor).
#2678's RED/GREEN evidence was a -fsyntax-only replay over the Tier 2 compdb TUs. The Ubuntu app build compiles a wider set — the Wayland EGL backend and the Qt frontend are Linux-app-only — so classes of this shape can be clean in the replay and still be red in a lane the PR CI never runs.
Suggested shape for whoever takes it: replay the Ubuntu app build's own compdb (build_ubuntu) rather than the Tier 2 one, enumerate the whole class in one pass, and fix it as one multi-directory PR with declarations before definitions ((void) only where the definition takes no parameters); no -Wno-* and no per-file pragmas, per this issue's acceptance. Expect libobs-opengl/gl-*.c.h, the Wayland/X11 backends and Qt frontend sources to be the overlap.
Related: #2703 (generated SWIG exemption, in flight), #2705 (Flatpak lane blocked earlier, at the flatpak-builder-lint action).
Correction to the parenthetical above (I checked the headers after posting): libobs-opengl/gl-wayland-egl.h declares only gl_wayland_egl_get_winsys_vtable, and gl_wayland_egl_windowinfo_destroy is static. The minimal fix for gl_wayland_egl_windowinfo_create is to make it static too — it is referenced only by the gl_winsys_vtable initialiser in the same translation unit (gl-wayland-egl.c.h:438), and the X11 sibling already has that shape:
libobs-opengl/gl-x11-egl.c.h:236: static struct gl_windowinfo *gl_x11_egl_windowinfo_create(const struct gs_init_data *info)
libobs-opengl/gl-wayland-egl.c.h:90: struct gl_windowinfo *gl_wayland_egl_windowinfo_create(...) <-- needs the same
So this is a one-token fix in one file, not a declaration in a header. It still wants the class-wide sweep described above (the Ubuntu-app-only TUs are the gap in #2678's replay), but if someone wants the lane green first, this is the next single edit it will ask for.
Resuming: refreshing the claim (last progress was ~19 h ago) with a re-check of what is actually left on master, because the backfill this issue carries is now partly fixed.
The one red in the backfill comment is closed.libobs-opengl/gl-wayland-egl.c.h:90 is now static struct gl_windowinfo *gl_wayland_egl_windowinfo_create(...) — fix(libobs-opengl): Make the Wayland windowinfo factory static (#2703) #2710 (6ae5bc10f, "Make the Wayland windowinfo factory static") took the one-token shape the correction above proposed, matching the X11 sibling.
The backfill's real finding was not the one file, it was the class: #2678's replay enumerated the Tier 2 compdb, while the Ubuntu app lane compiles a wider TU set (libobs-opengl Wayland/EGL, the X11 backend, Qt frontend, the Linux-only plugin targets). I have not enumerated that wider set, so I am not claiming it is clean.
Remaining -Wno-* instances on master, classified — none of these is the global pin this issue was filed about:
Enumerate the Ubuntu-app-only TU class from that lane's own compdb rather than the Tier 2 one, fix any first-party missing prototype as declarations-before-definitions ((void) only for empty parameter lists, no -Wno-*, no per-file pragmas), and take the clang-only macOS entries above separately — they cannot be verified on this Linux host, so they belong in the macOS lane or a follow-up, not in a silent flag edit.
The wider TU class is clean: replay evidence, no cache in the path
The remaining item this issue owned was the class, not the one file: #2678's replay enumerated the Tier 2 compdb, while the app lane also compiles libobs-opengl, the Linux plugin targets and frontend/. A warm zccache does not key on compile flags, so a green app lane was not proof by itself.
I replayed that wider set instead of trusting a lane.
What was replayed. The obs-rust-linux-validate tree's own ninja -t compdb (configured 2026-10-28 07:23 UTC, RelWithDebInfo, ENABLE_BROWSER=OFF): every C translation unit in the tree — libobs (73), libobs-opengl (2 unity TUs, 276 command references), plugins (113), shared (42), plus the 413 per-target unity/generated TUs the test and app targets build — 684 TUs, against master 0fada4c78.
ci/warning_findings.py is the right tool here for two reasons: it strips the zccache wrapper and runs -fsyntax-only, so nothing is served from the cache, and it keeps the diagnostic options as they are in the compdb — which for these TUs are the real lane flags, -Wmissing-prototypes -Wstrict-prototypes ... -Werror. A finding would therefore have printed as warning:/error: under its -W option.
Result:{"total": 0, "translation_units": 684, "directories": [], "findings": []} — zero findings. So the wider Linux C set meets this issue's first acceptance criterion without any suppression, and that is a stronger statement than the green lane was: it did not depend on the cache.
What is left, and it is only the clang half
Every first-party -Wno-missing-prototypes / -Wno-strict-prototypes on master is now one of:
The three clang-only entries cannot be cleared from this Linux host: the replay above is GCC, and installing clang here only approximates AppleClang. They need a clang replay (or a macOS lane) and, for the two that are -Wshorten-64-to-32-adjacent on macOS, a Mac. That is the whole remainder of this issue.
My read: the Linux acceptance criterion is met and demonstrated; the clang-only remainder is a separate, small unit that a macOS-capable session or a clang replay lane should take. Say which you want and I will file it as its own issue rather than leave it inside this one.
Measured the wider set this issue still owned: the Ubuntu app lane's first-party C is clean at #2678's flags.
The remaining item was that #2678's replay enumerated the Tier 2 compdb, while the app lane compiles a wider TU set. I enumerated that set from its own build tree rather than from Tier 2:
uv run build-aux/appimage/build.py --steps version,configure # manylinux base, 14 s, no compile
ninja -t compdb > compdb-app.json # in build_ubuntu/
uv run ci/warning_findings.py --compdb compdb-app.json --root /src --json
155 C translation units (1234 TUs total; the flags apply to the C subset), gcc 14.2, the AppImage/manylinux base — the same environment the Ubuntu 🐧 (OBS-Studio-Rust) and AppImage lanes use.
-Wmissing-prototypes and -Wstrict-prototypes are in every one of those flag lists; neither -Wno-missing-prototypes nor -Wno-strict-prototypes is present in a first-party list.
The only trees that still carry the pins are vendored (deps/libcaption, plugins/obs-outputs librtmp block). Re-running with --drop on both pins reports zero findings there too.
Sanity check on the helper rather than a bare zero: replaying one TU through warning_findings.replay() directly returns rc 0, findings 0, i.e. the compiler really ran (a unit with a broken include path fails loudly instead).
I also checked whether a source-scan test could pin this class the way ci/test_platform_missing_prototypes.py does. It cannot: a regex scan for a non-static file-scope definition with no prototype in an indexed header reports 244 candidates in libobs/ and plugins/*.c.h — their prototypes live in sibling *.c.h files the scan does not index — while the compiler reports none. Only the replay answers this, so no test is added.
Deliverable: #2833 adds the enumeration step to the mechanical-warning rule in docs/rust-port/coordination.md, so the next pin-drop measures the app set and not just a PR lane's.
Still open on this issue: the clang-only macOS entries (libobs-opengl/CMakeLists.txt:43, libobs/cmake/os-macos.cmake:18) cannot be verified from this Linux host. They need the same treatment measured in the macOS app lane, which is a separate dispatch, not a silent flag edit. Claim stays on this issue for that.
Resuming the macOS half: #2850 (draft) drops the two clang-only -Wno-strict-prototypes entries this issue still owned — libobs-opengl/CMakeLists.txt:43 and libobs/cmake/os-macos.cmake:18 (-Wno-shorten-64-to-32 stays, different diagnostic).
The branch is pushed as a draft on purpose: the RED is that the macOS app lane cannot report a strict-prototype finding for those targets while the warning is disabled, and the GREEN is that lane compiling the same TUs with -Wstrict-prototypes live. That log is the evidence this Linux host cannot produce by replay, so I will read Build 🧱 / macOS 🍏 from #2850's run and either record a clean list or fix what it reports in the same branch before marking it ready.
Activity
zackees commentedon Oct 27, 2026
Claiming: build(cmake): Drop -Wno-missing-prototypes and -Wno-strict-prototypes
Plan (one PR):
-Wno-missing-prototypes/-Wno-strict-prototypesfrom the CMake C flag lists (cmake/common/compiler_common.cmake:25,56,cmake/linux/compilerconfig.cmake:69) and build the Linux Tier 2 CMake tree; the first undeclared prototype is the RED state. Record the command and the first finding.staticdeclaration or a header prototype) — no per-file-Wno-*. If the volume in one directory is large, keep the flag list as the single switch and land the fixes in this PR../lint; PR CI's macOS/cross lane covers the macOS half (no macOS host here).docs/features.mdline: build tooling only.zackees commentedon Oct 27, 2026
Progress (branch
infra/2624-missing-prototypes, pushed; no PR yet — GREEN incomplete).RED reproduced. With the two pins removed and the positive forms added to the C-only lists (
cmake/common/compiler_common.cmake_obs_clang_c_options;cmake/linux/compilerconfig.cmakeGNU C line),uv run ci/local_gate.py --lane tier2-linux(gcc 15.2) fails with 228-Werror=findings across ~75 files:test/cmocka/*.c(the C tests themselves)plugins/*(incl. vendoredrnnoise6,librtmp5)libobs/*shared/*deps/*First reported finding:
libobs/graphics/effect.c.h:20: no previous prototype for 'gs_effect_actually_destroy'.Done so far (
88bd4a43): the eightlibobs/libobs-openglmissing-prototype functions are now declared before their definition (the unity group no longer sees the prototype only from a later file), the three()definitions/declarations get(void), and the vendored-dep exemptions are extended (glad's-Wno-strict-prototypestarget option gains GNU; libcaption gains-Wno-missing-prototypesbeside the-Wno-strict-prototypesit already had). Re-running the lane then surfaces the 228 above.Question before I spend the rest of the wat: the flags are global, so they also reach the
test/cmockaC tests (97 findings) and the vendored trees. Never edit an existing C test conflicts with no per-file-Wno-*if the two flags stay in the shared flag lists. Prefer:(void)on a test-local helper changes no assertion), ortest/cmockaexecutables on the current flags?I'll take (1) as the default and continue on the product code unless you say otherwise — that is the reading where the acceptance ("no function is silenced") still holds.
zackees commentedon Oct 27, 2026
Decision needed: how the
test/cmockaC tests (and vendored trees) are treated by this flag drop.The RED is reproduced and the direction is stuck on a genuine rule collision. Removing
-Wno-missing-prototypes/-Wno-strict-prototypesfrom the global CMake C flag lists reaches every C translation unit, including the cmocka tests:uv run ci/local_gate.py --lane tier2-linux(gcc 15.2) then reports 228-Werror=findings across ~75 files:test/cmocka/*.c(the C tests themselves)plugins/*(incl. vendoredrnnoise6,librtmp5)libobs/*shared/*deps/*The acceptance criteria ("no
-Wno-*in any flag list", "the remaining functions are declared before use") require the 97 test findings be declared too, but that means editing an existing C test, which AGENTS.md / the worker checklist forbid ("Never edit an existing C test"). Vendored deps already have the target-scoped exemption precedent from #516 (extend those, do not touch their sources) — but a-Wno-*on the test targets would still be "in a flag list".Options:
static, or declare them before use) — a behaviour-neutral edit to the test files, satisfying both acceptance criteria. This is what build(cmake): Compile C with -Wpedantic (deps/glad exempt) #2623 (-Wpedantic) already does (test/cmocka/test_audio_buffering_subsample.c,config_close_fault.c,test_graphics_host_functions.c,test_output_end_capture_thread_join.c), so it is the consistent reading; the "never edit a C test" rule reads as "don't weaken an assertion to pass a port".-Wno-*remains in a flag list, tripping the first acceptance criterion.libobs,plugins,shared) instead of the global C lists, so the test executables simply never receive them — nothing is silenced and no test is edited, at the cost of the cmocka C no longer being checked.My recommendation is (1): it is the only option that satisfies both acceptance criteria, it is behaviour-neutral, and it matches what this series already does for
-Wpedantic. I will take it unless told otherwise — the product-code fixes are independent of this and continue either way.State so far: branch
infra/2624-missing-prototypesis pushed.88bd4a43declares the eightlibobs/libobs-openglfunctions before their definitions, changes three()definitions to(void), and extends the vendored-dep exemptions (glad gains GNU-Wno-strict-prototypes, libcaption gains-Wno-missing-prototypes). No PR yet — GREEN is incomplete pending this decision on scope.zackees commentedon Oct 27, 2026
Decided: take option 2 — exempt the
test/cmockatest tree with a target-scoped option and do not edit any C test. Option 1's premise is factually wrong: #2623 does not edit test sources.Why not option 1. AGENTS.md:122 and
.claude/skills/obs-worker/SKILL.md:120say "Never edit existing C tests or public C headers to make a port pass." The maintainer's own in-flight PR for the sibling ratchet, #2643 (-Wpedantic, #2623), resolves the identical collision without touching a single test source: its onlytest/change istest/cmocka/CMakeLists.txt, adding#2643's full file list has notest/cmocka/*.c(the four files the issue names —test_audio_buffering_subsample.c,config_close_fault.c,test_graphics_host_functions.c,test_output_end_capture_thread_join.c— are not in it). So "the consistent reading" points the other way: the rule is absolute for a new warning, and the exemption lives in the test tree's ownCMakeLists.txt.That mechanism already exists here.
test/cmocka/CMakeLists.txtcarries three of these today, each target-scoped and under the comment# Existing C tests are never edited (obs-rust/obs-studio#516).:-Wno-shadow,-Wno-cast-qual,-Wno-format-nonliteral. Adding-Wno-missing-prototypes;-Wno-strict-prototypesbeside them, with a comment citing #516/#2624 and the same "existing C tests are never edited" reason, is the fourth application of the rule, not a new exception.How the acceptance criteria are then read (say which you did in the PR body):
-Wno-missing-prototypes/-Wno-strict-prototypesin any flag list" means the product flag lists:cmake/common/compiler_common.cmake(_obs_clang_c_options, and the GNU C line),cmake/linux/compilerconfig.cmake,cmake/macos/compilerconfig.cmake,cmake/windows/compilerconfig.cmake. Both pins leave all of them.-Wno-*may appear afterwards is a target-scoped exemption with a comment naming the reason:test/cmocka/CMakeLists.txt(the test executables) and the vendored trees build(cmake): compile C with -Wpedantic (#2623) #2643 already exempts (deps/glad,deps/libcaption, andrnnoise/librtmpfor theplugins/*findings). Extend those target options; do not edit their sources.libobs/*,libobs-opengl/*,shared/*, first-partyplugins/*andfrontendC findings are real and must be fixed with declarations before use /(void)/static, not silenced. That is the ~131 non-test findings; the work already done oninfra/2624-missing-prototypes(88bd4a43) stays.static, no forward declarations). Option 3 is rejected too: pushing the two positive flags into per-target lists makes the flag lists diverge per target and quietly stops checking any first-party target someone forgets to list.The two rules no longer collide: the product code gets the strict pair, the reference test tree keeps its existing exemption mechanism. This is a build-tooling change with no user-visible behaviour, so no
docs/features.mdline.Sources: AGENTS.md:122,
.claude/skills/obs-worker/SKILL.md:120, #2643 (-Wpedantic, #2623)test/cmocka/CMakeLists.txthunk, the existing-Wno-shadow/-Wno-cast-qual/-Wno-format-nonliterallines intest/cmocka/CMakeLists.txt, #516.If you disagree with reading the "no
-Wno-*in any flag list" criterion as product-only, say so and I will re-scope this to option 3 — the product-code fixes in88bd4a43are independent of it either way.11 remaining items
build(cmake): Give find-font.c.h a strict prototype (#2624)
zackees commentedon Oct 27, 2026
Backfill found by the dispatched
Ubuntu 🐧 (OBS-Studio-Rust)lane after #2703 exempted the SWIG-generatedshared/obs-scriptingsources: with that target compiling again, the same lane stops in first-party code, so this is a #2678 gap rather than another generated-file case.Evidence
Scheduled Repository Actionsoninfra/2703-scripting-missing-prototypesatec608e33(run 40595018476, job 122510595427):gl_wayland_egl_windowinfo_createis defined atlibobs-opengl/gl-wayland-egl.c.h:90with no declaration before it in that translation unit (libobs-opengl/gl-wayland-egl.hdeclares thegl_windowinfostruct andgl_wayland_egl_windowinfo_destroy, not this constructor).Why #2678's replay missed it
#2678's RED/GREEN evidence was a
-fsyntax-onlyreplay over the Tier 2 compdb TUs. The Ubuntu app build compiles a wider set — the Wayland EGL backend and the Qt frontend are Linux-app-only — so classes of this shape can be clean in the replay and still be red in a lane the PR CI never runs.Suggested shape for whoever takes it: replay the Ubuntu app build's own compdb (
build_ubuntu) rather than the Tier 2 one, enumerate the whole class in one pass, and fix it as one multi-directory PR with declarations before definitions ((void)only where the definition takes no parameters); no-Wno-*and no per-file pragmas, per this issue's acceptance. Expectlibobs-opengl/gl-*.c.h, the Wayland/X11 backends and Qt frontend sources to be the overlap.Related: #2703 (generated SWIG exemption, in flight), #2705 (Flatpak lane blocked earlier, at the
flatpak-builder-lintaction).zackees commentedon Oct 27, 2026
Correction to the parenthetical above (I checked the headers after posting):
libobs-opengl/gl-wayland-egl.hdeclares onlygl_wayland_egl_get_winsys_vtable, andgl_wayland_egl_windowinfo_destroyisstatic. The minimal fix forgl_wayland_egl_windowinfo_createis to make itstatictoo — it is referenced only by thegl_winsys_vtableinitialiser in the same translation unit (gl-wayland-egl.c.h:438), and the X11 sibling already has that shape:So this is a one-token fix in one file, not a declaration in a header. It still wants the class-wide sweep described above (the Ubuntu-app-only TUs are the gap in #2678's replay), but if someone wants the lane green first, this is the next single edit it will ask for.
zackees commentedon Oct 28, 2026
Resuming: refreshing the claim (last progress was ~19 h ago) with a re-check of what is actually left on master, because the backfill this issue carries is now partly fixed.
Verified on master (
0fada4c78)cmake/common/compiler_common.cmakeandcmake/linux/compilerconfig.cmakeno longer carry-Wno-missing-prototypesor-Wno-strict-prototypes; they were removed by build(cmake): compile C with -Wmissing-prototypes and -Wstrict-prototypes (#2624) #2678 (341468f9c).libobs-opengl/gl-wayland-egl.c.h:90is nowstatic struct gl_windowinfo *gl_wayland_egl_windowinfo_create(...)— fix(libobs-opengl): Make the Wayland windowinfo factory static (#2703) #2710 (6ae5bc10f, "Make the Wayland windowinfo factory static") took the one-token shape the correction above proposed, matching the X11 sibling.Scheduled Repository Actionsruns on master since build(cmake): compile C with -Wmissing-prototypes and -Wstrict-prototypes (#2624) #2678 haveBuild 🧱 / Ubuntu 🐧 (OBS-Studio-Rust)and the two macOS app builds green (run 40639664329 head25fc4bc6e, and the 15:51Z release run). That is not proof by itself — zccache does not key on compile flags, so a warm object can hide a flag-list change (build(cmake): Drop -Wno-missing-prototypes and -Wno-strict-prototypes #2624's own lesson) — but it is consistent with build(cmake): compile C with -Wmissing-prototypes and -Wstrict-prototypes (#2624) #2678's flag-bypassed replay, which came back with zero findings over the Tier 2 TU set.What this issue still owns
The backfill's real finding was not the one file, it was the class: #2678's replay enumerated the Tier 2 compdb, while the Ubuntu app lane compiles a wider TU set (
libobs-openglWayland/EGL, the X11 backend, Qt frontend, the Linux-only plugin targets). I have not enumerated that wider set, so I am not claiming it is clean.Remaining
-Wno-*instances on master, classified — none of these is the global pin this issue was filed about:deps/glad/CMakeLists.txt:33,deps/libcaption/CMakeLists.txt:37-38plugins/obs-outputs/CMakeLists.txt:112(librtmp block),plugins/obs-filters/cmake/rnnoise.cmake:58plugins/obs-x264/cmake/x264-test.cmake:5libobs-opengl/CMakeLists.txt:43,libobs/cmake/os-macos.cmake:18rust/obs-build/src/platform/graphics_macos.rs:29Next step (this claim)
Enumerate the Ubuntu-app-only TU class from that lane's own compdb rather than the Tier 2 one, fix any first-party missing prototype as declarations-before-definitions (
(void)only for empty parameter lists, no-Wno-*, no per-file pragmas), and take the clang-only macOS entries above separately — they cannot be verified on this Linux host, so they belong in the macOS lane or a follow-up, not in a silent flag edit.zackees commentedon Oct 28, 2026
The wider TU class is clean: replay evidence, no cache in the path
The remaining item this issue owned was the class, not the one file: #2678's replay enumerated the Tier 2 compdb, while the app lane also compiles
libobs-opengl, the Linux plugin targets andfrontend/. A warm zccache does not key on compile flags, so a green app lane was not proof by itself.I replayed that wider set instead of trusting a lane.
What was replayed. The
obs-rust-linux-validatetree's ownninja -t compdb(configured 2026-10-28 07:23 UTC,RelWithDebInfo,ENABLE_BROWSER=OFF): every C translation unit in the tree —libobs(73),libobs-opengl(2 unity TUs, 276 command references),plugins(113),shared(42), plus the 413 per-target unity/generated TUs the test and app targets build — 684 TUs, against master0fada4c78.ci/warning_findings.pyis the right tool here for two reasons: it strips thezccachewrapper and runs-fsyntax-only, so nothing is served from the cache, and it keeps the diagnostic options as they are in the compdb — which for these TUs are the real lane flags,-Wmissing-prototypes -Wstrict-prototypes ... -Werror. A finding would therefore have printed aswarning:/error:under its-Woption.Result:
{"total": 0, "translation_units": 684, "directories": [], "findings": []}— zero findings. So the wider Linux C set meets this issue's first acceptance criterion without any suppression, and that is a stronger statement than the green lane was: it did not depend on the cache.What is left, and it is only the clang half
Every first-party
-Wno-missing-prototypes/-Wno-strict-prototypeson master is now one of:libobs-opengl/CMakeLists.txt:43,libobs/cmake/os-macos.cmake:18,plugins/obs-x264/cmake/x264-test.cmake:5COMPILE_LANG_AND_ID:C,AppleClang,Clang— clang-only, so a GCC Linux lane never exercises the suppressed warningdeps/glad,deps/libcaption,plugins/obs-outputs(librtmp block),plugins/obs-filters/cmake/rnnoise.cmakeshared/obs-scripting(SWIG output)test/cmocka/CMakeLists.txt:60-61The three clang-only entries cannot be cleared from this Linux host: the replay above is GCC, and installing clang here only approximates AppleClang. They need a clang replay (or a macOS lane) and, for the two that are
-Wshorten-64-to-32-adjacent on macOS, a Mac. That is the whole remainder of this issue.My read: the Linux acceptance criterion is met and demonstrated; the clang-only remainder is a separate, small unit that a macOS-capable session or a clang replay lane should take. Say which you want and I will file it as its own issue rather than leave it inside this one.
zackees commentedon Oct 28, 2026
Measured the wider set this issue still owned: the Ubuntu app lane's first-party C is clean at #2678's flags.
The remaining item was that #2678's replay enumerated the Tier 2 compdb, while the app lane compiles a wider TU set. I enumerated that set from its own build tree rather than from Tier 2:
{"total": 0, "translation_units": 155, "findings": []}Ubuntu 🐧 (OBS-Studio-Rust)and AppImage lanes use.-Wmissing-prototypesand-Wstrict-prototypesare in every one of those flag lists; neither-Wno-missing-prototypesnor-Wno-strict-prototypesis present in a first-party list.opengl.nix-wayland+.h.c,opengl.nix+.h.c) are in the set, solibobs-opengl's Wayland/X11 backend is covered by the replay, not by fix(libobs-opengl): Make the Wayland windowinfo factory static (#2703) #2710 alone.deps/libcaption,plugins/obs-outputslibrtmp block). Re-running with--dropon both pins reports zero findings there too.Sanity check on the helper rather than a bare zero: replaying one TU through
warning_findings.replay()directly returnsrc 0, findings 0, i.e. the compiler really ran (a unit with a broken include path fails loudly instead).I also checked whether a source-scan test could pin this class the way
ci/test_platform_missing_prototypes.pydoes. It cannot: a regex scan for a non-staticfile-scope definition with no prototype in an indexed header reports 244 candidates inlibobs/andplugins/*.c.h— their prototypes live in sibling*.c.hfiles the scan does not index — while the compiler reports none. Only the replay answers this, so no test is added.Deliverable: #2833 adds the enumeration step to the mechanical-warning rule in
docs/rust-port/coordination.md, so the next pin-drop measures the app set and not just a PR lane's.Still open on this issue: the clang-only macOS entries (
libobs-opengl/CMakeLists.txt:43,libobs/cmake/os-macos.cmake:18) cannot be verified from this Linux host. They need the same treatment measured in the macOS app lane, which is a separate dispatch, not a silent flag edit. Claim stays on this issue for that.zackees commentedon Oct 28, 2026
Resuming the macOS half: #2850 (draft) drops the two clang-only
-Wno-strict-prototypesentries this issue still owned —libobs-opengl/CMakeLists.txt:43andlibobs/cmake/os-macos.cmake:18(-Wno-shorten-64-to-32stays, different diagnostic).The branch is pushed as a draft on purpose: the RED is that the macOS app lane cannot report a strict-prototype finding for those targets while the warning is disabled, and the GREEN is that lane compiling the same TUs with
-Wstrict-prototypeslive. That log is the evidence this Linux host cannot produce by replay, so I will readBuild 🧱 / macOS 🍏from #2850's run and either record a clean list or fix what it reports in the same branch before marking it ready.Claim stays on this issue.
style(cmake): gersemi after the pin drop (#2624)
build(cmake): compile C with -Wmissing-prototypes and -Wstrict-protot…
build(obs-scripting): Exempt the SWIG sources from -Wmissing-prototyp…
docs(coordination): measure a warning class on the app build's TU set (…
build(clang): drop the last two -Wno-strict-prototypes pins (obs-rust…