Skip to content

build(obs-ffmpeg): state the two macOS conversions #2865 missed (#2869) - #2870

Merged
zackees merged 1 commit into
masterfrom
fix/2869-macos-conversions
Oct 29, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/2869-macos-conversions

Conversation

@zackees

@zackees zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member

What

Master's macOS builds are red at 5c3a91bb7 (#2865's merge): Build 🧱 / macOS 🍏 (x86_64) and Analyze 🔬 / macOS 🍏 (clang-analyze) fail on two conversion diagnostics the target's new warning groups expose but #2865's Linux replay could not see. Fixes #2869.

RED

Real compiler output from nightly run 40825610950 (head 5c3a91bb7):

job annotation
Build macOS (x86_64) plugins/obs-ffmpeg/obs-ffmpeg-rist.h:175: implicit conversion changes signedness: int to enum rist_profile [-Werror,-Wsign-conversion]
Analyze macOS (clang-analyze) same line, plus plugins/obs-ffmpeg/obs-ffmpeg-source.c.h:437: implicit conversion loses integer precision: long long to enum video_range_type [-Wshorten-64-to-32]

Both arrive with the three conversion groups #2865 enabled on the target and macOS's CMAKE_COMPILE_WARNING_AS_ERROR; the Linux Tier 2 tree does not configure the plugin targets, so neither was in the 109-diagnostic replay.

GREEN

Two explicit casts at the boundaries, no behaviour change, no -Wno-* back:

  • obs-ffmpeg-rist.h: RISTContext::profile is an int field holding RIST_PROFILE_MAIN; rist_sender_create() takes enum rist_profile, so the call states (enum rist_profile)s->profile.
  • obs-ffmpeg-source.c.h: range is an enum video_range_type; obs_data_get_int() returns long long, so the assignment states (enum video_range_type) — the same shape as the (int)obs_data_get_int(...) line directly below it.

Checks

  • clang-format --dry-run --Werror clean on both files.
  • A local clang -fsyntax-only replay of the obs-ffmpeg.source+.h.c unity TU with -Wconversion -Wsign-conversion -Wfloat-conversion -Wshorten-64-to-32 reports no conversion diagnostics before or after the cast (clang 21 on Linux does not reproduce AppleClang's long long -> enum finding), so the macOS lane in CI is the evidence for both.
  • Expected: Build macOS (x86_64) and Analyze macOS compile obs-ffmpeg with the groups on and -Werror; no other TU changes.

Tiers: no Tier 1/2/3/4 applies — this is a warning-boundary change with no behaviour difference. User-visible behaviour is unchanged, so no docs/features.md line.

#2865 turned on -Wconversion/-Wsign-conversion/-Wfloat-conversion for the
obs-ffmpeg target and fixed the 109 diagnostics its Linux replay reported, but
that replay cannot see two macOS-only diagnostics: the plugin target is not
built in the Linux Tier 2 tree, and clang (with the Xcode warning set and
CMAKE_COMPILE_WARNING_AS_ERROR) reports both as errors. The nightly Scheduled
run 40825610950 at 5c3a91b is red in `Build macOS (x86_64)` and
`Analyze macOS (clang-analyze)` because of them:

- obs-ffmpeg-rist.h:175 passes RISTContext::profile (an int field holding
  RIST_PROFILE_MAIN) to rist_sender_create(), which takes enum rist_profile.
- obs-ffmpeg-source.c.h:437 assigns obs_data_get_int() (a long long) to
  `enum video_range_type range`.

Both keep the value the code already computed; no -Wno-* pin returns.

Fixes #2869

Co-authored-by: Hermes Agent <[email protected]>
@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

macOS evidence is dispatched: Scheduled 40827510045 on this branch. PR CI does not select the macOS lanes for a plugins/obs-ffmpeg header change (ci/ci_scope.py only switches on /platform/macos/-shaped paths), so the nightly workflow is the only reachable compiler for these two diagnostics. It runs Build 🧱 / macOS 🍏 (x86_64) and Analyze 🔬 / macOS 🍏 (clang-analyze) — the two jobs that are red on master at 5c3a91bb7.

I will queue this PR (gh pr merge 2870 --auto) once those two jobs are green, and say so here. If they are still red, the failure is mine and it stays a draft-equivalent until fixed.

@zackees

zackees commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

macOS GREEN on the branch: Scheduled 40827510045 — Build 🧱 / macOS 🍏 (x86_64) ✅, Build 🧱 / macOS 🍏 (arm64) ✅, Analyze 🔬 / macOS 🍏 (clang-analyze) ✅. Those are the two jobs that are red on master at 5c3a91bb7; the target now compiles with -Wconversion -Wsign-conversion -Wfloat-conversion and -Werror unchanged.

PR CI is green (Fast Gate, Format, Tier 2 Linux ON/OFF plus both serial shards, Validate Data) and auto-merge is on. Handed off to the coordinator — the next nightly on master is the confirmation.

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.

bug: master macOS build is red after #2865 — two conversion diagnostics the Linux replay missed

1 participant