mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +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
|
|
@ -199,7 +199,7 @@ err_exit:
|
|||
static CURL_THREAD_RETURN_T CURL_STDCALL getaddrinfo_thread(void *arg)
|
||||
{
|
||||
struct async_thrdd_addr_ctx *addr_ctx = arg;
|
||||
bool do_abort;
|
||||
curl_bit do_abort;
|
||||
|
||||
Curl_mutex_acquire(&addr_ctx->mutx);
|
||||
do_abort = addr_ctx->do_abort;
|
||||
|
|
@ -301,7 +301,7 @@ static void async_thrdd_destroy(struct Curl_easy *data)
|
|||
#endif
|
||||
|
||||
if(thrdd->addr && (thrdd->addr->thread_hnd != curl_thread_t_null)) {
|
||||
bool done;
|
||||
curl_bit done;
|
||||
|
||||
Curl_mutex_acquire(&addr->mutx);
|
||||
#ifndef CURL_DISABLE_SOCKETPAIR
|
||||
|
|
@ -462,7 +462,7 @@ static void async_thrdd_shutdown(struct Curl_easy *data)
|
|||
{
|
||||
struct async_thrdd_ctx *thrdd = &data->state.async.thrdd;
|
||||
struct async_thrdd_addr_ctx *addr_ctx = thrdd->addr;
|
||||
bool done;
|
||||
curl_bit done;
|
||||
|
||||
if(!addr_ctx)
|
||||
return;
|
||||
|
|
@ -569,7 +569,7 @@ CURLcode Curl_async_is_resolved(struct Curl_easy *data,
|
|||
struct Curl_dns_entry **dns)
|
||||
{
|
||||
struct async_thrdd_ctx *thrdd = &data->state.async.thrdd;
|
||||
bool done = FALSE;
|
||||
curl_bit done = FALSE;
|
||||
|
||||
DEBUGASSERT(dns);
|
||||
*dns = NULL;
|
||||
|
|
@ -666,7 +666,7 @@ CURLcode Curl_async_pollset(struct Curl_easy *data, struct easy_pollset *ps)
|
|||
{
|
||||
struct async_thrdd_ctx *thrdd = &data->state.async.thrdd;
|
||||
CURLcode result = CURLE_OK;
|
||||
bool thrd_done;
|
||||
curl_bit thrd_done;
|
||||
|
||||
#if !defined(USE_HTTPSRR_ARES) && defined(CURL_DISABLE_SOCKETPAIR)
|
||||
(void)ps;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue