Skip to content
Permalink
Browse files

Fix uninitialized variable peer_id

Reported by GCC

```
minetest/src/server.cpp:996:42: warning: ‘peer_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   errorstream << "ProcessData: peer=" << peer_id << e.what() << std::endl;
```
  • Loading branch information...
nerzhul committed Dec 4, 2018
1 parent 6f42605 commit 39ea1cd4283a77066d5f63b90146dfb17de813a8
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/server.cpp
@@ -980,7 +980,7 @@ void Server::AsyncRunStep(bool initial_step)

void Server::Receive()
{
session_t peer_id;
session_t peer_id = 0;
try {
NetworkPacket pkt;
m_con->Receive(&pkt);

0 comments on commit 39ea1cd

Please sign in to comment.
You can’t perform that action at this time.