From 7b1f8df5fa8ea5346315f999097b19836d7eac19 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Fri, 21 Dec 2012 23:47:50 -0800
Subject: [PATCH] Fix annoying warning in qtxmlpatterns about a value too big
 for the enum

api/qcoloroutput_p.h:74:60: error: signed shift result (0xFFFFF00000) requires 41 bits to represent, but 'int' only has 32 bits [-Werror,-Wshift-overflow]

The masks don't look right anyway. Let's just hardcode them according
to how many colours are used.

Change-Id: Idd3438ecab3fb666bd84929fb731011224b9c68e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
---
 src/xmlpatterns/api/qcoloroutput_p.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xmlpatterns/api/qcoloroutput_p.h b/src/xmlpatterns/api/qcoloroutput_p.h
index 864b90d9..f02a4506 100644
--- src/xmlpatterns/api/qcoloroutput_p.h.orig
+++ src/xmlpatterns/api/qcoloroutput_p.h
@@ -70,8 +70,8 @@ namespace QPatternist
             ForegroundShift = 10,
             BackgroundShift = 20,
             SpecialShift    = 20,
-            ForegroundMask  = ((1 << ForegroundShift) - 1) << ForegroundShift,
-            BackgroundMask  = ((1 << BackgroundShift) - 1) << BackgroundShift
+            ForegroundMask  = 0x1f << ForegroundShift,
+            BackgroundMask  = 0x7 << BackgroundShift
         };
 
     public:
