blob: b084887ba791ffc9ecb10c3c1718005cf0f0c599 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001Description: Fix compilation with gcc-6
2Author: Gert Wollny <gw.fossdev@gmail.com>
3Last-Updated: 2016-07-26
4Forwarded: No
5Bug-Debian: https://bugs.debian.org/811659
6Bug-Debian: https://bugs.debian.org/831146
7
8--- a/streams/wvstream.cc
9+++ b/streams/wvstream.cc
10@@ -907,9 +907,9 @@
11
12 if (forceable)
13 {
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);
20 }
21 else
22 {
23@@ -1019,7 +1019,8 @@
24
25 IWvStream::SelectRequest WvStream::get_select_request()
26 {
27- return IWvStream::SelectRequest(readcb, writecb, exceptcb);
28+ return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb),
29+ static_cast<bool>(exceptcb));
30 }
31
32
33@@ -1107,7 +1108,8 @@
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));
40 }
41
42