Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
Loïc Blot committed Dec 4, 2018
1 parent 6f42605 commit b753ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit b753ec4

Please sign in to comment.