diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-29 11:58:57 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-29 20:48:19 +0100 |
commit | 8dca04f47f528fbcf9d6b6b34d8c4a81dc347941 (patch) | |
tree | 2e5edceeac47cea4e2f8dbcc5d709c7431e479f3 /src | |
parent | f80d71aceb42b5798e80d95521d9512351d0be75 (diff) |
QByteArray: Fix MSVC warning.
Warning C4308: negative integral constant converted
to unsigned type.
Change-Id: Ibdb14ad2ceebd56715fda861151e92f6dc10f955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index fc4f4dc67f..ed3f31fc43 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 >= (1u << 31u) - sizeof(QByteArray::Data)) { //QByteArray does not support that huge size anyway. qWarning("qUncompress: Input data is corrupted"); return QByteArray(); @@ -562,7 +562,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 >= (1u << 31u) - sizeof(QByteArray::Data)) { //QByteArray does not support that huge size anyway. qWarning("qUncompress: Input data is corrupted"); return QByteArray(); |