diff options
| author | 2021-05-30 20:37:54 +0100 | |
|---|---|---|
| committer | 2021-05-30 20:37:54 +0100 | |
| commit | 02340285c564a7e82105137192d46d554a6fce3a (patch) | |
| tree | 696d1a6249841de62c3fed70310c2a347fc66732 /src/socketengines/poll.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/socketengines/poll.cpp')
| -rw-r--r-- | src/socketengines/poll.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socketengines/poll.cpp b/src/socketengines/poll.cpp index 992a69aae..4e2231802 100644 --- a/src/socketengines/poll.cpp +++ b/src/socketengines/poll.cpp @@ -78,7 +78,7 @@ bool SocketEngine::AddFd(EventHandler* eh, int event_mask) return false; } - unsigned int index = CurrentSetSize; + unsigned int index = static_cast<unsigned int>(CurrentSetSize); if (!SocketEngine::AddFdRef(eh)) { @@ -127,7 +127,7 @@ void SocketEngine::DelFd(EventHandler* eh) } unsigned int index = fd_mappings[fd]; - unsigned int last_index = CurrentSetSize - 1; + unsigned int last_index = static_cast<unsigned int>(CurrentSetSize - 1); int last_fd = events[last_index].fd; if (index != last_index) @@ -156,7 +156,7 @@ void SocketEngine::DelFd(EventHandler* eh) int SocketEngine::DispatchEvents() { - int i = poll(&events[0], CurrentSetSize, 1000); + int i = poll(&events[0], static_cast<unsigned int>(CurrentSetSize), 1000); int processed = 0; ServerInstance->UpdateTime(); |
