Menu

#58 EPOLLET implicit conversion warnings

open
nobody
None
5
2011-07-21
2011-07-21
Anonymous
No

I get the following warnings with boost 1.46.1. I have checked the updates for 1.47 and the latest on the asio repository and there doesn't seem to be a fix:

boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp: In constructor 'boost::asio::detail::epoll_reactor::epoll_reactor(boost::asio::io_service&)':
boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp:53: warning: negative integer implicitly converted to unsigned type
boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp: In member function 'int boost::asio::detail::epoll_reactor::register_descriptor(boost::asio::detail::socket_type, boost::asio::detail::epoll_reactor::descriptor_state*&)':
boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp:109: warning: negative integer implicitly converted to unsigned type
boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp: In member function 'void boost::asio::detail::epoll_reactor::start_op(int, boost::asio::detail::socket_type, boost::asio::detail::epoll_reactor::descriptor_state*&, boost::asio::detail::reactor_op*, bool)':
boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp:154: warning: negative integer implicitly converted to unsigned type
boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp: In member function 'void boost::asio::detail::epoll_reactor::interrupt()':
boost/common/include/boost/asio/detail/impl/epoll_reactor.ipp:319: warning: negative integer implicitly converted to unsigned type

In each of those, the problem is that EPOLLET is (1<<31), which triggers negative… Can the lines be changed from:
ev.events = EPOLLIN | EPOLLERR | EPOLLET;
To
ev.events = uint32_t(EPOLLIN | EPOLLERR | EPOLLET);

Discussion


Log in to post a comment.