meta: treat compiler warnings as errors in CI - #100
Merged
Conversation
The process helper polls at most stdout and stderr, so its descriptor count always fits nfds_t. Express that conversion explicitly instead of relying on platform specific type widths.
Read strings through their char representation before converting each value to an unsigned byte. This keeps escaping independent of whether plain char is signed.
Rejected and failed hunks are counts and cannot be negative. Keep them as size_t throughout so reporting them alongside the hunk container does not require a signed conversion.
stat represents file sizes with a signed type even though the public size API is unsigned. Reject an invalid negative size before making the otherwise lossless conversion explicit.
The saved range header position comes directly from the parser input counter and is used only in diagnostics. Preserve that type instead of narrowing it to a patch line number.
Quoted paths encode each filename byte with at most three octal digits. Accumulate in a wider type and reject values above 0377 instead of relying on an implicit narrowing conversion and wraparound.
CommandLineToArgvW returns its argument count through a signed Windows API type. Convert that successful result once to size_t before using it as the capacity for both narrowed argument vectors.
The Windows read API accepts an unsigned-int byte count and reports the result as int. Cap each request at INT_MAX before converting it, while preserving size_t requests on POSIX.
shannonbooth
force-pushed
the
warnings
branch
2 times, most recently
from
August 1, 2026 13:05
f0e27d1 to
47ab0b8
Compare
Windows reports errors and process metadata with DWORD while the standard error and test-process interfaces use int. Keep unavoidable conversions in private Win32 helpers and use explicit casts for the remaining API boundaries.
Keep the read-only attribute mask in the DWORD domain before complementing it. This avoids sign-extending the integer literal before applying it to Windows file attributes.
shannonbooth
force-pushed
the
warnings
branch
4 times, most recently
from
August 1, 2026 13:25
f6ec169 to
c59d6eb
Compare
Several compatibility cases use characters that Windows filenames cannot contain. Explicitly consume the generated patch path in their empty Windows branches.
Define WIN32_LEAN_AND_MEAN and NOMINMAX privately for every project target. Include the Shell API after its Windows header prerequisite now that it is no longer provided transitively. This reduces the SDK surface and avoids min and max macros without passing the policy to consumers.
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.
No description provided.