1 | $OpenBSD$ |
---|
2 | |
---|
3 | Use unsigned arithmetic to prevent signed overflow error from gcc 6. |
---|
4 | error: shift expression '(1048575 << 20)' overflows [-fpermissive] |
---|
5 | error: enumerator value for 'BackgroundMask' is not an integer constant |
---|
6 | |
---|
7 | BackgroundMask overflows because it sets bits 20 to 39, but there are |
---|
8 | no bits above 31 in an int. |
---|
9 | |
---|
10 | Index: src/xmlpatterns/api/qcoloroutput_p.h |
---|
11 | --- src/xmlpatterns/api/qcoloroutput_p.h.orig |
---|
12 | +++ src/xmlpatterns/api/qcoloroutput_p.h |
---|
13 | @@ -71,7 +71,7 @@ namespace QPatternist |
---|
14 | BackgroundShift = 20, |
---|
15 | SpecialShift = 20, |
---|
16 | ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift, |
---|
17 | - BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift |
---|
18 | + BackgroundMask = ((1U << BackgroundShift) - 1) << BackgroundShift |
---|
19 | }; |
---|
20 | |
---|
21 | public: |
---|