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(c-oracle): Add -Wformat=2 and -Wconversion to STRICT_FLAGS #2622
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.
Location:rust/obs-c-oracle/build.rs:118-129 (STRICT_FLAGS), which the oracle build applies with warnings(true), extra_warnings(true), warnings_into_errors(true) (build.rs:353-362, -Wall -Wextra -Werror at :357).
Gap:STRICT_FLAGS has -Wformat-nonliteral but not -Wformat=2, and no -Wconversion. Those are the only two Phase 1 flags missing.
RED: add both flags to STRICT_FLAGS and run the oracle build; it fails on the first violation. That failure is the RED state.
Acceptance criteria:
soldr cargo test --workspace --no-run is clean for the host Linux target, x86_64-pc-windows-gnu, x86_64-pc-windows-msvc, aarch64-apple-darwin and x86_64-apple-darwin. CI compiles every oracle translation unit for the cross targets (ci/local_gate.py:665-673), so PR CI covers all five.
The vendored deps/w32-pthreads build keeps its existing exemption; no new exemption is added for a first-party file.
Both flags stay in STRICT_FLAGS with no -Wno-* set beside them.
Claiming: c-oracle STRICT_FLAGS gains -Wformat=2 and -Wconversion (#2622, part of #516).
Plan (one PR, one unit):
Add -Wformat=2 and -Wconversion to STRICT_FLAGS in rust/obs-c-oracle/build.rs (host + cross targets; the MSVC branch is untouched).
RED: the oracle build fails on the first violation under the new flags — record the host failure.
GREEN: fix what the two flags find (per-file #pragma GCC diagnostic ignored only where an upstream/vendored construct is deliberate, as the existing -Wconversion pragmas in oracle/gif*.c, lzw.c already do), until the host build is clean; PR CI covers the five cross targets via ci/local_gate.py.
Keep both flags with no -Wno-* beside them, and add no exemption for a first-party file.
Unit complete: PR #2632 adds -Wformat=2 and -Wconversion to the oracle's STRICT_FLAGS and fixes the 37 -Wconversion findings at 30 sites over 9 first-party libobs/ files with explicit casts (values unchanged).
RED b522192da: flags added, oracle build fails on libobs/util/serializer.h:91 (int → uint8_t).
GREEN 1bb55c4f7: the casts; soldr cargo build -p obs-c-oracle clean, soldr cargo test -p obs-c-oracle --no-run clean, clang-format --dry-run --Werror clean on the nine files.
No -Wno-*, no #pragma, no first-party exemption; both flags stay in STRICT_FLAGS. Host Linux verified locally; the five cross targets are covered by PR CI's ci/local_gate.py lane.
Auto-merge is on. Note: the work is larger than size:S (30 sites / 9 files), and overlaps #2625's conversion-pin drop, which will touch the same libobs/ sources.
Activity
zackees commentedon Oct 27, 2026
Claiming: c-oracle
STRICT_FLAGSgains-Wformat=2and-Wconversion(#2622, part of #516).Plan (one PR, one unit):
-Wformat=2and-WconversiontoSTRICT_FLAGSinrust/obs-c-oracle/build.rs(host + cross targets; the MSVC branch is untouched).#pragma GCC diagnostic ignoredonly where an upstream/vendored construct is deliberate, as the existing-Wconversionpragmas inoracle/gif*.c,lzw.calready do), until the host build is clean; PR CI covers the five cross targets viaci/local_gate.py.-Wno-*beside them, and add no exemption for a first-party file.First PR within the hour.
zackees commentedon Oct 27, 2026
Unit complete: PR #2632 adds
-Wformat=2and-Wconversionto the oracle'sSTRICT_FLAGSand fixes the 37-Wconversionfindings at 30 sites over 9 first-partylibobs/files with explicit casts (values unchanged).b522192da: flags added, oracle build fails onlibobs/util/serializer.h:91(int→uint8_t).1bb55c4f7: the casts;soldr cargo build -p obs-c-oracleclean,soldr cargo test -p obs-c-oracle --no-runclean,clang-format --dry-run --Werrorclean on the nine files.-Wno-*, no#pragma, no first-party exemption; both flags stay inSTRICT_FLAGS. Host Linux verified locally; the five cross targets are covered by PR CI'sci/local_gate.pylane.Auto-merge is on. Note: the work is larger than
size:S(30 sites / 9 files), and overlaps#2625's conversion-pin drop, which will touch the samelibobs/sources.build(c-oracle): fix the macOS-clang -Wconversion findings (#2622)
build(c-oracle): Add -Wformat=2 and -Wconversion to STRICT_FLAGS (obs…