mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 09:08:49 -05:00
curl_threads: silence bad-function-cast warning
As uintptr_t and HANDLE are always the same size, this warning is harmless. Just silence it using an intermediate uintptr_t variable. Closes https://github.com/curl/curl/pull/2908
This commit is contained in:
parent
da23958423
commit
edfaf5a25b
@ -108,7 +108,8 @@ curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *),
|
|||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
t = CreateThread(NULL, 0, func, arg, 0, NULL);
|
t = CreateThread(NULL, 0, func, arg, 0, NULL);
|
||||||
#else
|
#else
|
||||||
t = (curl_thread_t)_beginthreadex(NULL, 0, func, arg, 0, NULL);
|
uintptr_t thread_handle = _beginthreadex(NULL, 0, func, arg, 0, NULL);
|
||||||
|
t = (curl_thread_t)thread_handle;
|
||||||
#endif
|
#endif
|
||||||
if((t == 0) || (t == LongToHandle(-1L))) {
|
if((t == 0) || (t == LongToHandle(-1L))) {
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
|
Loading…
Reference in New Issue
Block a user