forked from Mirrorlandia_minetest/minetest
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; ```
This commit is contained in:
parent
6f426056f1
commit
39ea1cd428
@ -980,7 +980,7 @@ void Server::AsyncRunStep(bool initial_step)
|
|||||||
|
|
||||||
void Server::Receive()
|
void Server::Receive()
|
||||||
{
|
{
|
||||||
session_t peer_id;
|
session_t peer_id = 0;
|
||||||
try {
|
try {
|
||||||
NetworkPacket pkt;
|
NetworkPacket pkt;
|
||||||
m_con->Receive(&pkt);
|
m_con->Receive(&pkt);
|
||||||
|
Loading…
Reference in New Issue
Block a user