@@ -2097,7 +2097,7 @@ static NET_Status SendOneDatagram(NET_DatagramSocket *sock, NET_Address *addr, U
20972097 for (int i = 0 ; i < sock -> num_handles ; i ++ ) {
20982098 const NET_DatagramSocketHandle * handle = & sock -> handles [i ];
20992099 if ((handle -> family == family ) && (handle -> protocol == protocol )) { // !!! FIXME: strictly speaking, this _probably_ just needs to check `family`, right?
2100- const int rc = sendto (handle -> handle , buf , (size_t ) buflen , 0 , addrwithport -> ai_addr , (SockLen ) addrwithport -> ai_addrlen );
2100+ const int rc = ( int ) sendto (handle -> handle , buf , (size_t ) buflen , 0 , addrwithport -> ai_addr , (SockLen ) addrwithport -> ai_addrlen );
21012101 const int err = (rc == SOCKET_ERROR ) ? LastSocketError () : 0 ;
21022102 freeaddrinfo (addrwithport );
21032103 if (err != 0 ) {
@@ -2127,7 +2127,7 @@ static NET_Status SendOneDatagram(NET_DatagramSocket *sock, NET_Address *addr, U
21272127 }
21282128
21292129 //SDL_Log("Broadcasting on %s ...", handle->broadcast->human_readable);
2130- const int rc = sendto (handle -> handle , buf , (size_t ) buflen , 0 , addrwithport -> ai_addr , (SockLen ) addrwithport -> ai_addrlen );
2130+ const int rc = ( int ) sendto (handle -> handle , buf , (size_t ) buflen , 0 , addrwithport -> ai_addr , (SockLen ) addrwithport -> ai_addrlen );
21312131 const int err = (rc == SOCKET_ERROR ) ? LastSocketError () : 0 ;
21322132 freeaddrinfo (addrwithport );
21332133 if (!err ) {
@@ -2153,7 +2153,7 @@ static NET_Status SendOneDatagram(NET_DatagramSocket *sock, NET_Address *addr, U
21532153 }
21542154
21552155 //SDL_Log("Broadcasting on %s ...", bc->human_readable);
2156- const int rc = sendto (handle -> handle , buf , (size_t ) buflen , 0 , addrwithport -> ai_addr , (SockLen ) addrwithport -> ai_addrlen );
2156+ const int rc = ( int ) sendto (handle -> handle , buf , (size_t ) buflen , 0 , addrwithport -> ai_addr , (SockLen ) addrwithport -> ai_addrlen );
21572157 const int err = (rc == SOCKET_ERROR ) ? LastSocketError () : 0 ;
21582158 freeaddrinfo (addrwithport );
21592159 if (!err ) {
@@ -2284,7 +2284,7 @@ bool NET_ReceiveDatagram(NET_DatagramSocket *sock, NET_Datagram **dgram)
22842284 AddressStorage from ;
22852285 SockLen fromlen = sizeof (from );
22862286 // WinSock's recvfrom wants a `char *` buffer instead of `void *`. The cast here is harmless on BSD Sockets.
2287- const int br = recvfrom (sock -> handles [i ].handle , (char * ) sock -> recv_buffer , sizeof (sock -> recv_buffer ), 0 , (struct sockaddr * ) & from , & fromlen );
2287+ const int br = ( int ) recvfrom (sock -> handles [i ].handle , (char * ) sock -> recv_buffer , sizeof (sock -> recv_buffer ), 0 , (struct sockaddr * ) & from , & fromlen );
22882288 if (br == SOCKET_ERROR ) {
22892289 const int err = LastSocketError ();
22902290 if (WouldBlock (err )) {
0 commit comments