gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 175/208: curl_threads: fix MSVC compiler warning


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 175/208: curl_threads: fix MSVC compiler warning
Date: Wed, 09 Aug 2017 17:36:12 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.

commit 0139545607ef56fdad11ef00dc1df05cdcbb763a
Author: Marcel Raad <address@hidden>
AuthorDate: Tue Aug 1 11:56:41 2017 +0200

    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
---
 lib/curl_threads.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 ||

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]