diff --git a/polymer/eduke32/source/enet/src/compress.c b/polymer/eduke32/source/enet/src/compress.c index 784489a78..fac155e71 100644 --- a/polymer/eduke32/source/enet/src/compress.c +++ b/polymer/eduke32/source/enet/src/compress.c @@ -128,7 +128,7 @@ enet_symbol_rescale (ENetSymbol * symbol) if((encodeLow ^ (encodeLow + encodeRange)) >= ENET_RANGE_CODER_TOP) \ { \ if(encodeRange >= ENET_RANGE_CODER_BOTTOM) break; \ - encodeRange = -encodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \ + encodeRange = -(signed)encodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \ } \ ENET_RANGE_CODER_OUTPUT (encodeLow >> 24); \ encodeRange <<= 8; \ @@ -360,7 +360,7 @@ enet_range_coder_compress (void * context, const ENetBuffer * inBuffers, size_t if((decodeLow ^ (decodeLow + decodeRange)) >= ENET_RANGE_CODER_TOP) \ { \ if(decodeRange >= ENET_RANGE_CODER_BOTTOM) break; \ - decodeRange = -decodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \ + decodeRange = -(signed)decodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \ } \ decodeCode <<= 8; \ if (inData < inEnd) \ diff --git a/polymer/eduke32/source/enet/src/peer.c b/polymer/eduke32/source/enet/src/peer.c index a546a7276..7731e41ba 100644 --- a/polymer/eduke32/source/enet/src/peer.c +++ b/polymer/eduke32/source/enet/src/peer.c @@ -430,7 +430,7 @@ enet_peer_ping (ENetPeer * peer) void enet_peer_ping_interval (ENetPeer * peer, enet_uint32 pingInterval) { - peer -> pingInterval = pingInterval ? pingInterval : ENET_PEER_PING_INTERVAL; + peer -> pingInterval = pingInterval ? pingInterval : (enet_uint32)ENET_PEER_PING_INTERVAL; } /** Sets the timeout parameters for a peer. @@ -453,9 +453,9 @@ enet_peer_ping_interval (ENetPeer * peer, enet_uint32 pingInterval) void enet_peer_timeout (ENetPeer * peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum) { - peer -> timeoutLimit = timeoutLimit ? timeoutLimit : ENET_PEER_TIMEOUT_LIMIT; - peer -> timeoutMinimum = timeoutMinimum ? timeoutMinimum : ENET_PEER_TIMEOUT_MINIMUM; - peer -> timeoutMaximum = timeoutMaximum ? timeoutMaximum : ENET_PEER_TIMEOUT_MAXIMUM; + peer -> timeoutLimit = timeoutLimit ? timeoutLimit : (enet_uint32)ENET_PEER_TIMEOUT_LIMIT; + peer -> timeoutMinimum = timeoutMinimum ? timeoutMinimum : (enet_uint32)ENET_PEER_TIMEOUT_MINIMUM; + peer -> timeoutMaximum = timeoutMaximum ? timeoutMaximum : (enet_uint32)ENET_PEER_TIMEOUT_MAXIMUM; } /** Force an immediate disconnection from a peer. diff --git a/polymer/eduke32/source/net.c b/polymer/eduke32/source/net.c index b7dadfaca..457ecefbd 100644 --- a/polymer/eduke32/source/net.c +++ b/polymer/eduke32/source/net.c @@ -45,7 +45,7 @@ uint32_t g_netMapRevision = 0; ENetHost *g_netServer = NULL; ENetHost *g_netClient = NULL; ENetPeer *g_netClientPeer = NULL; -int32_t g_netPort = 23513; +enet_uint16 g_netPort = 23513; int32_t g_netDisconnect = 0; char g_netPassword[32]; int32_t g_netPlayersWaiting = 0; @@ -71,14 +71,14 @@ static void alloc_multimapstate(int32_t i) { if (g_multiMapState[i] == NULL) { - g_multiMapState[i] = Bcalloc(1, sizeof(netmapstate_t)); + g_multiMapState[i] = (netmapstate_t *)Bcalloc(1, sizeof(netmapstate_t)); if (g_multiMapState[i] == NULL) G_GameExit("OUT OF MEMORY in alloc_multimapstate"); } if (g_pendingMapState[i] == NULL) { - g_pendingMapState[i] = Bcalloc(1, sizeof(netmapstate_t)); + g_pendingMapState[i] = (netmapstate_t *)Bcalloc(1, sizeof(netmapstate_t)); if (g_pendingMapState[i] == NULL) G_GameExit("OUT OF MEMORY in alloc_multimapstate"); } diff --git a/polymer/eduke32/source/net.h b/polymer/eduke32/source/net.h index b8ab30b52..f52d19128 100644 --- a/polymer/eduke32/source/net.h +++ b/polymer/eduke32/source/net.h @@ -135,7 +135,7 @@ extern ENetPeer *g_netClientPeer; extern char g_netPassword[32]; extern int32_t g_netDisconnect; extern int32_t g_netPlayersWaiting; -extern int32_t g_netPort; +extern enet_uint16 g_netPort; extern int32_t g_networkMode; extern int32_t lastsectupdate[MAXSECTORS]; extern int32_t lastupdate[MAXSPRITES]; diff --git a/polymer/eduke32/source/xdelta3/xdelta3.h b/polymer/eduke32/source/xdelta3/xdelta3.h index 7d7598b4a..b2288f403 100644 --- a/polymer/eduke32/source/xdelta3/xdelta3.h +++ b/polymer/eduke32/source/xdelta3/xdelta3.h @@ -135,7 +135,7 @@ typedef signed int ssize_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; -typedef unsigned long uint32_t; +typedef unsigned __int32 uint32_t; typedef ULONGLONG uint64_t; #else /* mingw32, lcc and watcom provide a proper header */