Skip to content

build(linux-pulseaudio): compile one target with the conversion warnings enabled (#2625) - #2740

Merged
zackees merged 2 commits into
masterfrom
infra/2625-conversion-pulseaudio
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2625-conversion-pulseaudio

Conversation

@zackees

@zackees zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member

Part of the #2625 per-target series, after the merged linux-alsa slice (#2690).

RED

821a2c60f enables -Wconversion, -Wsign-conversion and -Wfloat-conversion on the linux-pulseaudio target only. Replaying the target's 12 Tier 2 translation units from the build tree compdb with the three groups enabled reports four diagnostics, all in plugins/linux-pulseaudio/pulse-input.c.h:

  • :200 conversion from uint_fast32_t to uint32_t (out.samples_per_sec)
  • :203 conversion from long unsigned int to uint32_t (out.frames)
  • :327 conversion from uint_fast32_t to uint32_t (spec.rate)
  • :352 conversion from size_t to uint32_t (attr.fragsize)

The generated PCH TU also reports its pre-existing -Wpedantic empty-translation-unit warning; that TU is a build artifact and predates this change.

GREEN

14297b6ec makes the four narrowing conversions explicit at the call sites. The same replay reports zero conversion diagnostics.

Notes

The global -Wno-conversion / -Wno-sign-conversion / -Wno-float-conversion pins stay in the shared lists until every target is ratcheted; only this target enables the groups. Vendored trees and existing C tests are untouched.

Refs #2625

…ngs enabled (#2625)

RED: the target now builds with -Wconversion, -Wsign-conversion and
-Wfloat-conversion. The replay of its 12 Tier 2 translation units reports four
diagnostics in pulse-input.c.h (lines 200, 203, 327, 352), all conversions from
uint_fast32_t/size_t to uint32_t. The generated PCH TU also reports its known
-Wpedantic empty-translation-unit warning, which predates this change.
…xplicit (#2625)

GREEN: the same replay reports zero conversion diagnostics. The four casts
match the target types (uint32_t sample rate, frame count and buffer fragsize),
so no implicit narrowing remains.
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Worker tick: CI on 14297b6ec completed green (run 40648734796, all non-skipped jobs success, CI Gate ✅). Marked ready and queued for merge. Handed off to the coordinator; nothing else on this PR needs a worker.

Merged via the queue into master with commit 42c4488 Oct 28, 2026
37 checks passed
@zackees
zackees deleted the infra/2625-conversion-pulseaudio branch October 28, 2026 07:43
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