diff options
author | Gisle Vanem <gisle.vanem@gmail.com> | 2018-06-29 23:22:19 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-07-01 12:45:27 +0200 |
commit | ab4cf99694fc5a028c4eb7abdc4891919b57a32e (patch) | |
tree | 50f44d4be84ad7a7cb65c0b36d569174a28d13ea /lib/telnet.c | |
parent | 9679790b23eb888933af88555a05bedc398d6026 (diff) | |
download | curl-ab4cf99694fc5a028c4eb7abdc4891919b57a32e.tar.gz |
telnet: fix clang warnings
telnet.c(1401,28): warning: cast from function call of type 'int' to
non-matching type 'HANDLE' (aka 'void *') [-Wbad-function-cast]
Fixes #2696
Closes #2700
Diffstat (limited to 'lib/telnet.c')
-rw-r--r-- | lib/telnet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/telnet.c b/lib/telnet.c index b04d30bb9..fff3f3378 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -92,6 +92,7 @@ #endif #ifdef USE_WINSOCK +typedef WSAEVENT (WINAPI *WSOCK2_EVENT)(void); typedef FARPROC WSOCK2_FUNC; static CURLcode check_wsock2(struct Curl_easy *data); #endif @@ -1306,7 +1307,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) #ifdef USE_WINSOCK HMODULE wsock2; WSOCK2_FUNC close_event_func; - WSOCK2_FUNC create_event_func; + WSOCK2_EVENT create_event_func; WSOCK2_FUNC event_select_func; WSOCK2_FUNC enum_netevents_func; WSAEVENT event_handle; @@ -1360,7 +1361,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) } /* Grab a pointer to WSACreateEvent */ - create_event_func = GetProcAddress(wsock2, "WSACreateEvent"); + create_event_func = (WSOCK2_EVENT) GetProcAddress(wsock2, "WSACreateEvent"); if(create_event_func == NULL) { failf(data, "failed to find WSACreateEvent function (%u)", GetLastError()); FreeLibrary(wsock2); |