Skip to content

Commit

Permalink
Fix warnings about signed-unsigned comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
heinrich5991 committed Sep 20, 2024
1 parent 855ff3c commit 94bec3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mastersrv/mastersrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ int main(int argc, const char **argv)

bool NoBackcompat = DontSendBackwardCompatibility(Packet.m_pData, Packet.m_DataSize);

if(Packet.m_DataSize >= sizeof(SERVERBROWSE_HEARTBEAT)+2 &&
if(Packet.m_DataSize >= (int)sizeof(SERVERBROWSE_HEARTBEAT)+2 &&
mem_comp(Packet.m_pData, SERVERBROWSE_HEARTBEAT, sizeof(SERVERBROWSE_HEARTBEAT)) == 0)
{
NETADDR Alt;
Expand All @@ -478,7 +478,7 @@ int main(int argc, const char **argv)
// add it
AddCheckserver(&Packet.m_Address, &Alt, SERVERTYPE_NORMAL, Token);
}
else if(Packet.m_DataSize >= sizeof(SERVERBROWSE_GETCOUNT) &&
else if(Packet.m_DataSize >= (int)sizeof(SERVERBROWSE_GETCOUNT) &&
mem_comp(Packet.m_pData, SERVERBROWSE_GETCOUNT, sizeof(SERVERBROWSE_GETCOUNT)) == 0)
{
dbg_msg("mastersrv", "count requested, responding with %d", m_NumServers);
Expand All @@ -494,7 +494,7 @@ int main(int argc, const char **argv)
m_CountData.m_Low = Count&0xff;
m_NetOp.Send(&p, Token);
}
else if(Packet.m_DataSize >= sizeof(SERVERBROWSE_GETLIST) &&
else if(Packet.m_DataSize >= (int)sizeof(SERVERBROWSE_GETLIST) &&
mem_comp(Packet.m_pData, SERVERBROWSE_GETLIST, sizeof(SERVERBROWSE_GETLIST)) == 0)
{
// someone requested the list
Expand Down

0 comments on commit 94bec3d

Please sign in to comment.