wok-next view wvstreams/stuff/patches/gcc-6.patch @ rev 20916
libopenraw, abiword: update deps; boost: pack unpacked libs
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Aug 21 05:42:25 2018 +0300 (2018-08-21) |
parents | |
children |
line source
1 Description: Fix compilation with gcc-6
2 Author: Gert Wollny <gw.fossdev@gmail.com>
3 Last-Updated: 2016-07-26
4 Forwarded: No
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
10 @@ -907,9 +907,9 @@
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 @@
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 }
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 }