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:
parent
f80d71aceb
commit
8dca04f47f
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user