Forráskód Böngészése

warning workarounds

eihrul 13 éve
szülő
commit
70d0d8f25d
3 módosított fájl, 3 hozzáadás és 3 törlés
  1. 1 1
      peer.c
  2. 1 1
      protocol.c
  3. 1 1
      win32.c

+ 1 - 1
peer.c

@@ -715,7 +715,7 @@ enet_peer_queue_incoming_command (ENetPeer * peer, const ENetProtocol * command,
     static ENetIncomingCommand dummyCommand;
 
     ENetChannel * channel = & peer -> channels [command -> header.channelID];
-    enet_uint32 unreliableSequenceNumber = 0, reliableSequenceNumber;
+    enet_uint32 unreliableSequenceNumber = 0, reliableSequenceNumber = 0;
     enet_uint16 reliableWindow, currentWindow;
     ENetIncomingCommand * incomingCommand;
     ENetListIterator currentCommand;

+ 1 - 1
protocol.c

@@ -170,7 +170,7 @@ enet_protocol_remove_sent_unreliable_commands (ENetPeer * peer)
 static ENetProtocolCommand
 enet_protocol_remove_sent_reliable_command (ENetPeer * peer, enet_uint16 reliableSequenceNumber, enet_uint8 channelID)
 {
-    ENetOutgoingCommand * outgoingCommand;
+    ENetOutgoingCommand * outgoingCommand = NULL;
     ENetListIterator currentCommand;
     ENetProtocolCommand commandNumber;
     int wasSent = 1;

+ 1 - 1
win32.c

@@ -238,7 +238,7 @@ enet_socket_send (ENetSocket socket,
                    (DWORD) bufferCount,
                    & sentLength,
                    0,
-                   address != NULL ? (struct sockaddr *) & sin : 0,
+                   address != NULL ? (struct sockaddr *) & sin : NULL,
                    address != NULL ? sizeof (struct sockaddr_in) : 0,
                    NULL,
                    NULL) == SOCKET_ERROR)