Repository navigation
Description
What
After #2877 enabled -Wsign-conversion on the libobs targets, the macOS Tier 2 lane is red on the Rust seam call sites: every helper the port declares with an int parameter where the caller passes a C enum fails on AppleClang.
Evidence: Rust Tier 2 (macos-26) on #2887's head (run 40841202389, job 123343547757) — once the obs-cocoa.m.h four were fixed, the lane reported:
libobs/obs-canvas.c.h:328:42: 'enum video_format' to 'int' [-Werror,-Wsign-conversion]
libobs/obs-display.c.h:197:37: 'enum gs_color_space' to 'int'
libobs/obs-scene.c.h:433:45 / :460:45: 'enum obs_bounds_type' to 'int'
libobs/obs-scene.c.h:578:25 / :579:25 / :580:23: 'const enum obs_scale_type' / 'obs_blending_method' / 'obs_blending_type' to 'int'
libobs/obs-scene.c.h:649:32 / :674:31:46 / :676:66:81 / :771:43 / :808:89: obs_scale_type, gs_color_space, obs_blending_type, obs_blending_method to 'int'
libobs/obs-source-deinterlace.c.h:237:45 / :283:76 / :285:43:76 / :289:86: obs_deinterlace_mode, gs_color_space to 'int'
19 sites in 4 files (clang reports every diagnostic in a TU, so the set is complete for these groups).
Why macOS only
Clang gives an enumeration whose enumerators are all non-negative an unsigned underlying type; AppleClang does that for obs_bounds_type, obs_scale_type, gs_color_space, obs_deinterlace_mode and video_format, GCC and Linux clang keep int. So the same call is a sign conversion only on Apple platforms, which is why #2877's Linux replay of the libobs TUs could not see them.
Cause
The port's seam helpers take int for those enums on purpose (the Rust ABI of rust/obs-scene, rust/obs-source, rust/obs-canvas is c_int, and some carry -1 sentinels), e.g. bool obs_scene_item_transform_bounded(int bounds_type);. Every call site that passes the real enum value is therefore an implicit enum -> int conversion.
Blocks
This is master breakage, not just this lane: the merge group for #2872 (run 40841144417) failed Rust Tier 2 (macos-26) and #2872 was ejected from the queue. Every PR that selects the lane is blocked until it is fixed.
Fix
State the conversion at each call site: obs_scene_item_transform_bounded((int)item->bounds_type), obs_canvas_rules_format_set((int)ovi->output_format), obs_display_clear_linear((int)gs_get_color_space()), the deinterlace set, and the .scale_filter / .blend_method / .blend_type initializers, with one comment where the reason is not obvious. The seam signatures and the Rust ABI stay unchanged, so no Rust test changes; libobs/obs-cocoa.m.h is the separate #2887.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 29, 2026
Claiming: #2896 — the enum -> int conversions at the Rust seam call sites
Plan (one PR, one commit; this is the repo's warning-ratchet shape, so the RED evidence is the macOS lane log already on the issue and the commit is the GREEN):
libobs/obs-scene.c.h(12),libobs/obs-source-deinterlace.c.h(5),libobs/obs-display.c.h(1),libobs/obs-canvas.c.h(1). The seam signatures and the Rustc_intABI stay as they are, with a comment where the cast's justification is not self-evident../lintlocally; no Rust or cmocka change is needed (no signature moves), and Linux cannot reproduce the finding — the macOS lane on the PR is the proof.First PR in this tick.
build(libobs): state the enum -> int seam conversions (#2896)
build(libobs): state the enum -> int seam conversions (#2896)
build(libobs): state the enum -> int seam conversions (#2896)
build(libobs): state the source render-plan conversions (#2896)
build(libobs): state the frame-copy and shape conversions (#2896)
libobs: state the deinterlace-draw and gpu-encode gate conversions too (
libobs: state the video-mix and output-slot conversions too (#2896)
build(libobs): state the enum -> int seam conversions (#2896)
build(libobs): state the source render-plan conversions (#2896)
build(libobs): state the frame-copy and shape conversions (#2896)
build(libobs): state the enum -> int seam conversions (#2896)
build(libobs): state the source render-plan conversions (#2896)
build(libobs): state the encoder-type and frame-copy seam casts (#2896)
build(libobs): state the hotkey key enum's int conversion (#2896)
zackees commentedon Oct 29, 2026
The remaining seam casts are on master (obs-output.c.h:1084/1092/1131/1189, obs-hotkey-name-map.c.h:109, plus 997c3d5 for the caption shift), so #2897 had nothing left and is closed as superseded. What is still missing is evidence: the macOS Tier 2 lane only runs on schedule/merge-queue, and the merge-queue runs skip the macOS build job, so the next Scheduled run is the first chance to confirm. Leaving this open until that run is green.
build(libobs): state the encoder-type and frame-copy seam casts (#2896)
build(libobs): state the hotkey key enum's int conversion (#2896)
zackees commentedon Oct 29, 2026
Closing with the evidence this issue was waiting for: the macOS Tier 2 lane is green on a merge-queue run at the current
mastertip.masterf907d09db, merge-group run 40869896715 (2026-10-29T12:01Z): Build 🧱 / Rust Tier 2 (macos-26) =success.One correction to the open question above: the merge-queue path does run the lane that compiles these seams. It skips
Build 🧱 / macOS 🏗️(the full app), butBuild 🧱 / Rust Tier 2 (macos-26)runs and is the job that produced every diagnostic listed in the body (libobs/obs-canvas.c.h:328,obs-scene.c.h,obs-source-deinterlace.c.h, and theobs-cocoa.m.hset). So a green merge-group run is the acceptance evidence, not only the nextschedulerun.The casts for the listed groups are on master (
997c3d546caption shift,obs-output.c.h:1084/1092/1131/1189,obs-hotkey-name-map.c.h:109, plus5298ad7ecfor the source frame-copy seams). #2897 stayed closed as superseded.The next
Scheduledrun is still worth reading for the unrelated CEF-EOL pin job, but this lane no longer blocks anything.build(libobs): state the source frame-copy seam conversions (obs-rust…