X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa00c4e3bae8bf7127a5b43dbf68695c00ee2f94..b85b06e13d22e7fc1604ec1a49caa1227a1b3d36:/src/unix/epolldispatcher.cpp diff --git a/src/unix/epolldispatcher.cpp b/src/unix/epolldispatcher.cpp index 75fa0909b4..7d751e8d57 100644 --- a/src/unix/epolldispatcher.cpp +++ b/src/unix/epolldispatcher.cpp @@ -42,8 +42,10 @@ // 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 ) @@ -194,6 +196,10 @@ wxEpollDispatcher::DoPoll(epoll_event *events, int numEvents, int timeout) const 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; }