QByteArray: Fix MSVC warning.

Warning C4308: negative integral constant converted
to unsigned type.

Change-Id: Ibdb14ad2ceebd56715fda861151e92f6dc10f955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Friedemann Kleint 2011-11-29 11:58:57 +01:00 committed by Qt by Nokia
parent f80d71aceb
commit 8dca04f47f

View File

@ -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();