From 50b84b716d3932e8c75c9fb4edac257c02d2c361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Wed, 10 Aug 2011 18:11:25 +0200 Subject: Fix warning when compiling with VS 2008 warning C4308: negative integral constant converted to unsigned type --- src/corelib/tools/qbytearray.cpp | 4 ++-- 1 file 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(); -- cgit v0.12