summaryrefslogtreecommitdiff
path: root/src/xmlpatterns
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-12-17 10:55:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-17 12:11:15 +0100
commit425fd6442f2d50d5fc3afa9e5269de7f65dd5a81 (patch)
treea87192b430c2691ed21876e1c4b8339f12059bad /src/xmlpatterns
parentfb077ecd3b8cf99474d048918f52e855a4bd50d4 (diff)
downloadqtxmlpatterns-425fd6442f2d50d5fc3afa9e5269de7f65dd5a81.tar.gz
Fix compiler warning on shift overflow.
In file included from /Users/erik/dev/qt5-stable/qtbase/include/QtXmlPatterns/5.0.0/QtXmlPatterns/private/qcoloroutput_p.h:1: /Users/erik/dev/qt5-stable/qtbase/include/QtXmlPatterns/5.0.0/QtXmlPatterns/private/../../../../../../qtxmlpatterns/src/xmlpatterns/api/qcoloroutput_p.h:74:60: warning: signed shift result (0xFFFFF00000) requires 41 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ Change-Id: Id8b1d9748dd94350d42889b36c61c163786beb38 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r--src/xmlpatterns/api/qcoloroutput_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/api/qcoloroutput_p.h b/src/xmlpatterns/api/qcoloroutput_p.h
index 864b90d..01614da 100644
--- a/src/xmlpatterns/api/qcoloroutput_p.h
+++ b/src/xmlpatterns/api/qcoloroutput_p.h
@@ -71,7 +71,7 @@ namespace QPatternist
BackgroundShift = 20,
SpecialShift = 20,
ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
+ BackgroundMask = ((1 << (sizeof(int) - BackgroundShift)) - 1) << BackgroundShift
};
public: