-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
Description
At line 1401 in lib/telnet.c:
event_handle = (WSAEVENT)create_event_func();
I get this warning when compiling with clang-cl ver 6:
telnet.c(1401,28): warning: cast from function call of type 'int' to non-matching
type 'HANDLE' (aka 'void *') [-Wbad-function-cast]
event_handle = (WSAEVENT)create_event_func();
^~~~~~~~~~~~~~~~~~~clang-cl is quite correct; a WSAEVENT is always 32-bit and HANDLE is a void* which could be 64-bit wide.
A fix is maybe to use another typedef for the WSACreateEvent() function. Like:
typedef WSAEVENT (WINAPI *WSOCK2_EVENT)(void);
...
WSOCK2_EVENT create_event_func;
...
create_event_func = (WSOCK2_EVENT) GetProcAddress(wsock2, "WSACreateEvent");Reactions are currently unavailable