summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Selector.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-06-22 00:29:53 +0200
committerJose <jose@zeroc.com>2019-06-22 00:29:53 +0200
commitc5959fd09de61604bedd75354401df6a57395d65 (patch)
tree3b0227f631c8b20fb1a1a274b92f63f52f34af2c /cpp/src/Ice/Selector.cpp
parentSmall fix (diff)
parentEnable -Wconversion with clang - Close #363 (diff)
downloadice-c5959fd09de61604bedd75354401df6a57395d65.tar.bz2
ice-c5959fd09de61604bedd75354401df6a57395d65.tar.xz
ice-c5959fd09de61604bedd75354401df6a57395d65.zip
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'cpp/src/Ice/Selector.cpp')
-rw-r--r--cpp/src/Ice/Selector.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp
index e76b8ad93f5..0070f93fb3f 100644
--- a/cpp/src/Ice/Selector.cpp
+++ b/cpp/src/Ice/Selector.cpp
@@ -612,7 +612,7 @@ Selector::finishSelect(vector<pair<EventHandler*, SocketOperation> >& handlers)
((ev.events & (EPOLLOUT | EPOLLERR)) ?
SocketOperationWrite : SocketOperationNone));
#elif defined(ICE_USE_KQUEUE)
- struct kevent& ev = _events[i];
+ struct kevent& ev = _events[static_cast<size_t>(i)];
if(ev.flags & EV_ERROR)
{
Ice::Error out(_instance->initializationData().logger);
@@ -822,11 +822,12 @@ Selector::updateSelector()
// Check for errors, we ignore EINPROGRESS that started showing up with macOS Sierra
// and which occurs when another thread removes the FD from the kqueue (see ICE-7419).
//
- if(_changes[i].flags & EV_ERROR && _changes[i].data != EINPROGRESS)
+ if(_changes[static_cast<size_t>(i)].flags & EV_ERROR &&
+ _changes[static_cast<size_t>(i)].data != EINPROGRESS)
{
Ice::Error out(_instance->initializationData().logger);
out << "error while updating selector:\n"
- << IceUtilInternal::errorToString(static_cast<int>(_changes[i].data));
+ << IceUtilInternal::errorToString(static_cast<int>(_changes[static_cast<size_t>(i)].data));
}
}
}