// helper: return EPOLLxxx mask corresponding to the given flags (and also log
// debugging messages about it)
-static uint32_t GetEpollMask(int flags, int WXUNUSED_UNLESS_DEBUG(fd))
+static uint32_t GetEpollMask(int flags, int fd)
{
+ wxUnusedVar(fd); // unused if wxLogTrace() disabled
+
uint32_t ep = 0;
if ( flags & wxFDIO_INPUT )
bool wxEpollDispatcher::HasPending() const
{
epoll_event event;
+
+ // NB: it's not really clear if epoll_wait() can return a number greater
+ // than the number of events passed to it but just in case it can, use
+ // >= instead of == here, see #10397
return DoPoll(&event, 1, 0) >= 1;
}