mirror of
https://github.com/curl/curl.git
synced 2026-07-24 12:27:16 +03:00
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:
parent
57ff2d6c91
commit
85c841cb45
32 changed files with 73 additions and 73 deletions
|
|
@ -228,7 +228,7 @@ static CURLcode httpchunk_readwrite(struct Curl_easy *data,
|
|||
case CHUNK_POSTLF:
|
||||
if(*buf == 0x0a) {
|
||||
/* The last one before we go back to hex state and start all over. */
|
||||
Curl_httpchunk_reset(data, ch, ch->ignore_body);
|
||||
Curl_httpchunk_reset(data, ch, (bool)ch->ignore_body);
|
||||
}
|
||||
else if(*buf != 0x0d) {
|
||||
ch->state = CHUNK_FAILED;
|
||||
|
|
@ -602,7 +602,7 @@ static CURLcode cr_chunked_read(struct Curl_easy *data,
|
|||
CURLcode result = CURLE_READ_ERROR;
|
||||
|
||||
*pnread = 0;
|
||||
*peos = ctx->eos;
|
||||
*peos = (bool)ctx->eos;
|
||||
|
||||
if(!ctx->eos) {
|
||||
if(!ctx->read_eos && Curl_bufq_is_empty(&ctx->chunkbuf)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue