mirror of
https://github.com/curl/curl.git
synced 2026-05-30 04:07:27 +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
|
|
@ -244,7 +244,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
|||
struct OutStruct *outs = &per->outs;
|
||||
struct OperationConfig *config = per->config;
|
||||
size_t bytes = sz * nmemb;
|
||||
bool is_tty = global->isatty;
|
||||
bool is_tty = (bool)global->isatty;
|
||||
#ifdef _WIN32
|
||||
CONSOLE_SCREEN_BUFFER_INFO console_info;
|
||||
intptr_t fhnd;
|
||||
|
|
|
|||
|
|
@ -1166,8 +1166,8 @@ static CURLcode create_single(struct OperationConfig *config,
|
|||
CURLSH *share, struct State *state,
|
||||
bool *added, bool *skipped)
|
||||
{
|
||||
const bool orig_isatty = global->isatty;
|
||||
const bool orig_noprogress = global->noprogress;
|
||||
const bool orig_isatty = (bool)global->isatty;
|
||||
const bool orig_noprogress = (bool)global->noprogress;
|
||||
CURLcode result = CURLE_OK;
|
||||
while(state->urlnode) {
|
||||
struct per_transfer *per = NULL;
|
||||
|
|
@ -2174,8 +2174,8 @@ static CURLcode run_all_transfers(CURLSH *share,
|
|||
CURLcode result)
|
||||
{
|
||||
/* Save the values of noprogress and isatty to restore them later on */
|
||||
bool orig_noprogress = global->noprogress;
|
||||
bool orig_isatty = global->isatty;
|
||||
bool orig_noprogress = (bool)global->noprogress;
|
||||
bool orig_isatty = (bool)global->isatty;
|
||||
struct per_transfer *per;
|
||||
|
||||
/* Time to actually do the transfers */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue