aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2017-08-01 11:56:41 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2017-08-01 17:22:30 +0200
commit0139545607ef56fdad11ef00dc1df05cdcbb763a (patch)
treee82d9a9dc474236fb9ec7eeb1a9b38d62cefc16b
parent62495ff31af577ad06724142c9437d0c712988d6 (diff)
curl_threads: fix MSVC compiler warning
Use LongToHandle to convert from long to HANDLE in the Win32 implementation. This should fix the following warning when compiling with MSVC 11 (2012) in 64-bit mode: lib\curl_threads.c(113): warning C4306: 'type cast' : conversion from 'long' to 'HANDLE' of greater size Closes https://github.com/curl/curl/pull/1717
-rw-r--r--lib/curl_threads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/curl_threads.c b/lib/curl_threads.c
index 19897107a..c1624a913 100644
--- a/lib/curl_threads.c
+++ b/lib/curl_threads.c
@@ -110,7 +110,7 @@ curl_thread_t Curl_thread_create(unsigned int (CURL_STDCALL *func) (void *),
#else
t = (curl_thread_t)_beginthreadex(NULL, 0, func, arg, 0, NULL);
#endif
- if((t == 0) || (t == (curl_thread_t)-1L)) {
+ if((t == 0) || (t == LongToHandle(-1L))) {
#ifdef _WIN32_WCE
DWORD gle = GetLastError();
errno = ((gle == ERROR_ACCESS_DENIED ||