Re: [Boost-bugs] [Boost C++ Libraries] #5668: epoll_reactor implicit type conversion warnings:

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5668: epoll_reactor implicit type conversion warnings:
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-04 15:27:28


#5668: epoll_reactor implicit type conversion warnings:
-----------------------------------------------+----------------------------
  Reporter: David Benoit <benoit@…> | Owner: chris_kohlhoff
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.47.0 | Severity: Problem
Resolution: wontfix | Keywords:
-----------------------------------------------+----------------------------

Comment (by anonymous):

 Replying to [comment:3 chris_kohlhoff]:
> I am not going to make this change. Asio's use is the approach shown in
 epoll's man page. Furthermore, -Wconversion is not part of -Wall or
 -Wextra and it is not feasible (or desirable) to suppress all possible
 warnings.

 I don't think OP implied that -Wconversion was a part of -Wall or -Wextra,
 merely that specification of -Werror turns all warnings into errors, and
 thus this warning is an error. Although I agree with you that it is not
 possible to suppress all warnings, all reasonably expected warnings should
 be accounted for, but -Wconversion is a legitimate option. In this case
 the use of the #define-d value of EPOLLET produces a value that is a
 different sign than the rvalue of the statement. The fact that "events"
 member of struct epoll_event is defined as uint32_t suggests that a
 wrapper such as suggested would be appropriate in assigning the value.

> If you want to propose that these constants be made unsigned then I
 suggest you raise a ticket against glibc.

 Until and unless glibc starts defining these as variables with real types,
 this isn't going to happen. The responsibility thus lies with the
 library/application developer to use it appropriately.

 In this case, it is true that the man page for epoll suggests the use as
 you have it, but man pages are not definitive sources of all usage, merely
 examples.

 I find it unfortunate that you are unwilling to accept this as a bug.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5668#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC