blob: 899eeb92126d59cba7122cb709a3a5015450cd11 [file] [log] [blame]
Patrick Williams520786c2023-06-25 16:20:36 -05001Upstream-Status: Pending
2
Brad Bishop6e60e8b2018-02-01 10:27:11 -05003Description: Fix compilation with gcc-6
4Author: Gert Wollny <gw.fossdev@gmail.com>
5Last-Updated: 2016-07-26
6Forwarded: No
7Bug-Debian: https://bugs.debian.org/811659
8Bug-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