summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-10 16:11:25 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2011-08-11 16:58:08 (GMT)
commit50b84b716d3932e8c75c9fb4edac257c02d2c361 (patch)
tree1f2e9fc5d94734838b9acf776d68274d190d114a /src
parentc3b62edd3b3b8a231f13818f5722ad948d6f962b (diff)
downloadQt-50b84b716d3932e8c75c9fb4edac257c02d2c361.zip
Qt-50b84b716d3932e8c75c9fb4edac257c02d2c361.tar.gz
Qt-50b84b716d3932e8c75c9fb4edac257c02d2c361.tar.bz2
Fix warning when compiling with VS 2008
warning C4308: negative integral constant converted to unsigned type
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qbytearray.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 767b713..a8edea4 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -541,7 +541,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
forever {
ulong alloc = len;
- if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ if (len >= ulong(1 << 31) - sizeof(QByteArray::Data)) {
//QByteArray does not support that huge size anyway.
qWarning("qUncompress: Input data is corrupted");
return QByteArray();
@@ -561,7 +561,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK:
if (len != alloc) {
- if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ if (len >= ulong(1 << 31) - sizeof(QByteArray::Data)) {
//QByteArray does not support that huge size anyway.
qWarning("qUncompress: Input data is corrupted");
return QByteArray();