From 0286dcdb3481966e0f2c2cabbc468a4b299adf5c Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 25 Apr 2021 23:44:51 -0400 Subject: silence some MSVC warnings --- peer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'peer.c') diff --git a/peer.c b/peer.c index 9370ef4..32f9809 100644 --- a/peer.c +++ b/peer.c @@ -99,7 +99,7 @@ enet_peer_throttle (ENetPeer * peer, enet_uint32 rtt) int enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet) { - ENetChannel * channel = & peer -> channels [channelID]; + ENetChannel * channel; ENetProtocol command; size_t fragmentLength; @@ -108,6 +108,7 @@ enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet) packet -> dataLength > peer -> host -> maximumPacketSize) return -1; + channel = & peer -> channels [channelID]; fragmentLength = peer -> mtu - sizeof (ENetProtocolHeader) - sizeof (ENetProtocolSendFragment); if (peer -> host -> checksum != NULL) fragmentLength -= sizeof(enet_uint32); -- cgit v1.2.3