Skip to content

meta: treat compiler warnings as errors in CI - #100

Merged
shannonbooth merged 15 commits into
mainfrom
warnings
Aug 1, 2026
Merged

meta: treat compiler warnings as errors in CI#100
shannonbooth merged 15 commits into
mainfrom
warnings

Conversation

@shannonbooth

Copy link
Copy Markdown
Owner

No description provided.

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
shannonbooth force-pushed the warnings branch 2 times, most recently from f0e27d1 to 47ab0b8 Compare August 1, 2026 13:05
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
shannonbooth force-pushed the warnings branch 4 times, most recently from f6ec169 to c59d6eb Compare August 1, 2026 13:25
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.
@shannonbooth
shannonbooth merged commit cb7ebfd into main Aug 1, 2026
10 checks passed
@shannonbooth
shannonbooth deleted the warnings branch August 1, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant