summaryrefslogtreecommitdiffstats
path: root/drivers/unix/packet_peer_udp_posix.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-09-01 22:33:39 +0200
committerHein-Pieter van Braam <hp@tmm.cx>2017-09-02 01:59:26 +0200
commit9c63ab99f0a505b0f60079bb30cc453b4415fddc (patch)
tree7014cb6e8c2e71a0583656f76d3d37d719a74fb0 /drivers/unix/packet_peer_udp_posix.cpp
parentdac150108ab3c1f41d5fd86cc6853f883064caaf (diff)
downloadredot-engine-9c63ab99f0a505b0f60079bb30cc453b4415fddc.tar.gz
Fix use of unitialized variables
The second in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'drivers/unix/packet_peer_udp_posix.cpp')
-rw-r--r--drivers/unix/packet_peer_udp_posix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp
index b743990b92..61d2737555 100644
--- a/drivers/unix/packet_peer_udp_posix.cpp
+++ b/drivers/unix/packet_peer_udp_posix.cpp
@@ -73,8 +73,8 @@ Error PacketPeerUDPPosix::get_packet(const uint8_t **r_buffer, int &r_buffer_siz
if (queue_count == 0)
return ERR_UNAVAILABLE;
- uint32_t size;
- uint8_t type;
+ uint32_t size = 0;
+ uint8_t type = IP::TYPE_NONE;
rb.read(&type, 1, true);
if (type == IP::TYPE_IPV4) {
uint8_t ip[4];