mirror of
https://github.com/minetest/minetest.git
synced 2024-09-19 03:48:36 +02:00
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