Repository navigation
build(linux-pulseaudio): compile one target with the conversion warnings enabled (#2625) - #2740
Merged
Merged
Conversation
…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.
Member
Author
|
Worker tick: CI on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the #2625 per-target series, after the merged linux-alsa slice (#2690).
RED
821a2c60fenables-Wconversion,-Wsign-conversionand-Wfloat-conversionon thelinux-pulseaudiotarget only. Replaying the target's 12 Tier 2 translation units from the build tree compdb with the three groups enabled reports four diagnostics, all inplugins/linux-pulseaudio/pulse-input.c.h::200conversion fromuint_fast32_ttouint32_t(out.samples_per_sec):203conversion fromlong unsigned inttouint32_t(out.frames):327conversion fromuint_fast32_ttouint32_t(spec.rate):352conversion fromsize_ttouint32_t(attr.fragsize)The generated PCH TU also reports its pre-existing
-Wpedanticempty-translation-unit warning; that TU is a build artifact and predates this change.GREEN
14297b6ecmakes 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-conversionpins 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