summaryrefslogtreecommitdiff
path: root/lib/curl_threads.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-08-23 09:55:40 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-08-24 19:20:16 +0200
commitedfaf5a25becd00e346d21bc6512de68056139f6 (patch)
tree08502ecf98d937fe31f95775e715977f3285ca7c /lib/curl_threads.c
parentda2395842316d9445daeded06e9e0bc30abb95ce (diff)
downloadcurl-edfaf5a25becd00e346d21bc6512de68056139f6.tar.gz
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
Diffstat (limited to 'lib/curl_threads.c')
-rw-r--r--lib/curl_threads.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/curl_threads.c b/lib/curl_threads.c
index c1624a913..b8f0cd35d 100644
--- a/lib/curl_threads.c
+++ b/lib/curl_threads.c
@@ -108,7 +108,8 @@ curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *),
#ifdef _WIN32_WCE
t = CreateThread(NULL, 0, func, arg, 0, NULL);
#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
if((t == 0) || (t == LongToHandle(-1L))) {
#ifdef _WIN32_WCE