diff options
| author | 2021-05-30 20:37:54 +0100 | |
|---|---|---|
| committer | 2021-05-30 20:37:54 +0100 | |
| commit | 02340285c564a7e82105137192d46d554a6fce3a (patch) | |
| tree | 696d1a6249841de62c3fed70310c2a347fc66732 /src/configreader.cpp | |
| parent | Add a workaround for a bug in GitHub Actions. (diff) | |
Added -Wshorten-64-to-32 and fixed all warnings.
Diffstat (limited to 'src/configreader.cpp')
| -rw-r--r-- | src/configreader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 2db989b9a..3f4bf9d6f 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -287,8 +287,8 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current) if (!ports.empty()) { irc::portparser portrange(ports, false); - while (int port = portrange.GetToken()) - me->ports.insert(port); + while (long port = portrange.GetToken()) + me->ports.insert(static_cast<int>(port)); } ClassMap::iterator oldMask = oldBlocksByMask.find(std::make_pair(me->name, me->type)); @@ -347,7 +347,7 @@ void ServerConfig::Fill() } SoftLimit = ConfValue("performance")->getUInt("softlimit", (SocketEngine::GetMaxFds() > 0 ? SocketEngine::GetMaxFds() : LONG_MAX), 10); CCOnConnect = ConfValue("performance")->getBool("clonesonconnect", true); - MaxConn = ConfValue("performance")->getUInt("somaxconn", SOMAXCONN); + MaxConn = static_cast<int>(ConfValue("performance")->getUInt("somaxconn", SOMAXCONN)); TimeSkipWarn = ConfValue("performance")->getDuration("timeskipwarn", 2, 0, 30); XLineMessage = options->getString("xlinemessage", "You're banned!", 1); ServerDesc = server->getString("description", "Configure Me", 1); |
