mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:53:37 +03:00
unit1309: fix warning on Windows x64
When targeting x64, MinGW-w64 complains about conversions between 32-bit long and 64-bit pointers. Fix this by reusing the GNUTLS_POINTER_TO_SOCKET_CAST / GNUTLS_SOCKET_TO_POINTER_CAST logic from gtls.c, moving it to warnless.h as CURLX_POINTER_TO_INTEGER_CAST / CURLX_INTEGER_TO_POINTER_CAST. Closes https://github.com/curl/curl/pull/2341
This commit is contained in:
parent
828187d86b
commit
24753bcd48
3 changed files with 17 additions and 17 deletions
|
|
@ -26,6 +26,11 @@
|
|||
#include <curl/curl.h> /* for curl_socket_t */
|
||||
#endif
|
||||
|
||||
#define CURLX_POINTER_TO_INTEGER_CAST(p) \
|
||||
((char *)(p) - (char *)NULL)
|
||||
#define CURLX_INTEGER_TO_POINTER_CAST(i) \
|
||||
((void *)((char *)NULL + (i)))
|
||||
|
||||
unsigned short curlx_ultous(unsigned long ulnum);
|
||||
|
||||
unsigned char curlx_ultouc(unsigned long ulnum);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue