ws2_32/tests: Avoid casting a WSAAccept function pointer parameter in test_accept.

This commit is contained in:
Andrew Nguyen 2011-06-03 07:36:54 -05:00 committed by Alexandre Julliard
parent c72ecb1de6
commit e9e0df23b8
3 changed files with 6 additions and 6 deletions

View File

@ -5825,7 +5825,7 @@ INT WINAPI WSCDeinstallProvider(LPGUID lpProviderId, LPINT lpErrno)
* WSAAccept (WS2_32.26) * WSAAccept (WS2_32.26)
*/ */
SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen, SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
LPCONDITIONPROC lpfnCondition, DWORD dwCallbackData) LPCONDITIONPROC lpfnCondition, DWORD_PTR dwCallbackData)
{ {
int ret = 0, size = 0; int ret = 0, size = 0;
@ -5835,7 +5835,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
SOCKET cs; SOCKET cs;
SOCKADDR src_addr, dst_addr; SOCKADDR src_addr, dst_addr;
TRACE("Socket %04lx, sockaddr %p, addrlen %p, fnCondition %p, dwCallbackData %d\n", TRACE("Socket %04lx, sockaddr %p, addrlen %p, fnCondition %p, dwCallbackData %ld\n",
s, addr, addrlen, lpfnCondition, dwCallbackData); s, addr, addrlen, lpfnCondition, dwCallbackData);

View File

@ -2467,7 +2467,7 @@ static void test_accept(void)
ret = connect(connector, (struct sockaddr*)&address, sizeof(address)); ret = connect(connector, (struct sockaddr*)&address, sizeof(address));
ok(ret == 0, "connecting to accepting socket failed, error %d\n", WSAGetLastError()); ok(ret == 0, "connecting to accepting socket failed, error %d\n", WSAGetLastError());
accepted = WSAAccept(server_socket, NULL, NULL, (LPCONDITIONPROC) AlwaysDeferConditionFunc, 0); accepted = WSAAccept(server_socket, NULL, NULL, AlwaysDeferConditionFunc, 0);
ok(accepted == INVALID_SOCKET && WSAGetLastError() == WSATRY_AGAIN, "Failed to defer connection, %d\n", WSAGetLastError()); ok(accepted == INVALID_SOCKET && WSAGetLastError() == WSATRY_AGAIN, "Failed to defer connection, %d\n", WSAGetLastError());
accepted = accept(server_socket, NULL, 0); accepted = accept(server_socket, NULL, 0);

View File

@ -401,7 +401,7 @@ typedef int (CALLBACK *LPCONDITIONPROC)
LPWSABUF lpCalleeId, LPWSABUF lpCalleeId,
LPWSABUF lpCalleeData, LPWSABUF lpCalleeData,
GROUP *g, GROUP *g,
DWORD dwCallbackData DWORD_PTR dwCallbackData
); );
typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE) typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE)
@ -604,7 +604,7 @@ typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,int);
* "Winsock2 Function Typedefs" section below. * "Winsock2 Function Typedefs" section below.
*/ */
#if WS_API_PROTOTYPES #if WS_API_PROTOTYPES
SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD); SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD); INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD); INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
#define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString) #define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
@ -678,7 +678,7 @@ DWORD WINAPI WSAWaitForMultipleEvents(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
* "Winsock2 Prototypes" section above. * "Winsock2 Prototypes" section above.
*/ */
#if WS_API_TYPEDEFS #if WS_API_TYPEDEFS
typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD); typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD); typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD); typedef INT (WINAPI *LPFN_WSAADRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
#define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING) #define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)