Patrick Williams | 520786c | 2023-06-25 16:20:36 -0500 | [diff] [blame] | 1 | Upstream-Status: Pending |
| 2 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 3 | Description: Fix compilation with gcc-6 |
| 4 | Author: Gert Wollny <gw.fossdev@gmail.com> |
| 5 | Last-Updated: 2016-07-26 |
| 6 | Forwarded: No |
| 7 | Bug-Debian: https://bugs.debian.org/811659 |
| 8 | Bug-Debian: https://bugs.debian.org/831146 |
| 9 | |
| 10 | --- a/streams/wvstream.cc |
| 11 | +++ b/streams/wvstream.cc |
| 12 | @@ -907,9 +907,9 @@ |
| 13 | |
| 14 | if (forceable) |
| 15 | { |
| 16 | - si.wants.readable = readcb; |
| 17 | - si.wants.writable = writecb; |
| 18 | - si.wants.isexception = exceptcb; |
| 19 | + si.wants.readable = static_cast<bool>(readcb); |
| 20 | + si.wants.writable = static_cast<bool>(writecb); |
| 21 | + si.wants.isexception = static_cast<bool>(exceptcb); |
| 22 | } |
| 23 | else |
| 24 | { |
| 25 | @@ -1019,7 +1019,8 @@ |
| 26 | |
| 27 | IWvStream::SelectRequest WvStream::get_select_request() |
| 28 | { |
| 29 | - return IWvStream::SelectRequest(readcb, writecb, exceptcb); |
| 30 | + return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb), |
| 31 | + static_cast<bool>(exceptcb)); |
| 32 | } |
| 33 | |
| 34 | |
| 35 | @@ -1107,7 +1108,8 @@ |
| 36 | // inefficient, because if the alarm was expired then pre_select() |
| 37 | // returned true anyway and short-circuited the previous select(). |
| 38 | TRACE("hello-%p\n", this); |
| 39 | - return !alarm_was_ticking || select(0, readcb, writecb, exceptcb); |
| 40 | + return !alarm_was_ticking || select(0, static_cast<bool>(readcb), |
| 41 | + static_cast<bool>(writecb), static_cast<bool>(exceptcb)); |
| 42 | } |
| 43 | |
| 44 | |