Fix banmaster compilation. Fix some sign-compare warnings

This commit is contained in:
Ravomavain 2011-08-26 08:05:39 +02:00 committed by GreYFoX
parent de4a95c5d2
commit 47a1e2b230
2 changed files with 6 additions and 6 deletions

View file

@ -134,7 +134,7 @@ void PurgeBans()
}
}
void ConBan(IConsole::IResult *pResult, void *pUser, int ClientID)
void ConBan(IConsole::IResult *pResult, void *pUser)
{
NETADDR Addr;
const char *pStr = pResult->GetString(0);
@ -149,12 +149,12 @@ void ConBan(IConsole::IResult *pResult, void *pUser, int ClientID)
dbg_msg("banmaster", "invalid network address to ban, str='%s'", pStr);
}
void ConUnbanAll(IConsole::IResult *pResult, void *pUser, int ClientID)
void ConUnbanAll(IConsole::IResult *pResult, void *pUser)
{
ClearBans();
}
void ConSetBindAddr(IConsole::IResult *pResult, void *pUser, int ClientID)
void ConSetBindAddr(IConsole::IResult *pResult, void *pUser)
{
if(m_aBindAddr[0])
return;
@ -177,7 +177,7 @@ int main(int argc, const char **argv) // ignore_convention
IStorage *pStorage = CreateStorage("Teeworlds", argc, argv); // ignore_convention
m_pConsole = CreateConsole(CFGFLAG_BANMASTER);
m_pConsole->RegisterPrintCallback(StandardOutput, 0);
m_pConsole->RegisterPrintCallback(2, StandardOutput, 0);
m_pConsole->Register("ban", "s?r", CFGFLAG_BANMASTER, ConBan, 0, "Bans the specified ip");
m_pConsole->Register("unban_all", "", CFGFLAG_BANMASTER, ConUnbanAll, 0, "Unbans all ips");
m_pConsole->Register("bind", "s", CFGFLAG_BANMASTER, ConSetBindAddr, 0, "Binds to the specified address");
@ -222,7 +222,7 @@ int main(int argc, const char **argv) // ignore_convention
char aAddressStr[NETADDR_MAXSTRSIZE];
net_addr_str(&Packet.m_Address, aAddressStr, sizeof(aAddressStr));
if(Packet.m_DataSize >= sizeof(BANMASTER_IPCHECK) && mem_comp(Packet.m_pData, BANMASTER_IPCHECK, sizeof(BANMASTER_IPCHECK)) == 0)
if((unsigned)Packet.m_DataSize >= sizeof(BANMASTER_IPCHECK) && mem_comp(Packet.m_pData, BANMASTER_IPCHECK, sizeof(BANMASTER_IPCHECK)) == 0)
{
char *pAddr = (char *)Packet.m_pData + sizeof(BANMASTER_IPCHECK);
NETADDR CheckAddr;

View file

@ -1111,7 +1111,7 @@ void CServer::PumpNetwork()
{
}*/
if(Packet.m_DataSize >= sizeof(BANMASTER_IPBAN) &&
if((unsigned)Packet.m_DataSize >= sizeof(BANMASTER_IPBAN) &&
mem_comp(Packet.m_pData, BANMASTER_IPBAN, sizeof(BANMASTER_IPBAN)) == 0)
{
if(!g_Config.m_SvGlobalBantime)