1 Description: Fix compilation with gcc-6
2 Author: Gert Wollny <gw.fossdev@gmail.com>
3 Last-Updated: 2016-07-26
5 Bug-Debian: https://bugs.debian.org/811659
6 Bug-Debian: https://bugs.debian.org/831146
8 --- a/streams/wvstream.cc
9 +++ b/streams/wvstream.cc
14 - si.wants.readable = readcb;
15 - si.wants.writable = writecb;
16 - si.wants.isexception = exceptcb;
17 + si.wants.readable = static_cast<bool>(readcb);
18 + si.wants.writable = static_cast<bool>(writecb);
19 + si.wants.isexception = static_cast<bool>(exceptcb);
25 IWvStream::SelectRequest WvStream::get_select_request()
27 - return IWvStream::SelectRequest(readcb, writecb, exceptcb);
28 + return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb),
29 + static_cast<bool>(exceptcb));
34 // inefficient, because if the alarm was expired then pre_select()
35 // returned true anyway and short-circuited the previous select().
36 TRACE("hello-%p\n", this);
37 - return !alarm_was_ticking || select(0, readcb, writecb, exceptcb);
38 + return !alarm_was_ticking || select(0, static_cast<bool>(readcb),
39 + static_cast<bool>(writecb), static_cast<bool>(exceptcb));