Worked around strict aliasing warning on gcc 4.4.4, hopefully 4.4.x too

This commit is contained in:
Sergey Popov 2011-07-24 13:57:41 +00:00
parent a904ef0ae9
commit 9fdeeeb380

View file

@ -459,6 +459,7 @@ void connect_operation::run()
union
{
char data[4] ALIGN_4;
Uint32 num;
} buf;
SDLNet_Write32(0, &buf);
const int nbytes = SDLNet_TCP_Send(sock,&buf,4);
@ -536,6 +537,7 @@ connection accept_connection_pending(std::vector<TCPsocket>& pending_sockets,
union
{
char data[4] ALIGN_4;
Uint32 num;
} buf;
const TCPsocket psock = *i;