msvc: drop exception, make BIT() a bitfield with Visual Studio

Add casts to `bool`, or use `bit` type in local variables, where
neccessary to avoid MSVC compiler warnings C4242.

Note: There may remain places needing the above updates, where not
tested in CI, and missed in manual review.

Also:
- urldata: convert struct field `connect_only` to bitfield to match its
  counterpart in another struct.
- rename curl-specific `bit` type to `curl_bit`.

Closes #20142
This commit is contained in:
Viktor Szakats 2026-01-01 16:38:56 +01:00
parent 57ff2d6c91
commit 85c841cb45
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
32 changed files with 73 additions and 73 deletions

View file

@ -986,7 +986,8 @@ static CURLcode on_stream_frame(struct Curl_cfilter *cf,
else
stream->status_code = -1;
h2_xfer_write_resp_hd(cf, data, stream, STRCONST("\r\n"), stream->closed);
h2_xfer_write_resp_hd(cf, data, stream, STRCONST("\r\n"),
(bool)stream->closed);
if(stream->status_code / 100 != 1) {
stream->resp_hds_complete = TRUE;