Initialize variable to quiet valgrind.

It's accessed by the Q_ASSERT in QArrayData::data().

Change-Id: I859ef9c736b24857cd3f57f9fa54aafd36e57afc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Sérgio Martins 2013-04-18 23:37:49 +01:00 committed by The Qt Project
parent fd956af257
commit 805031814b

View File

@ -556,6 +556,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
d.take(); // realloc was successful d.take(); // realloc was successful
d.reset(p); d.reset(p);
d->offset = sizeof(QByteArrayData); d->offset = sizeof(QByteArrayData);
d->size = 0; // Shut up valgrind "uninitialized variable" warning
int res = ::uncompress((uchar*)d->data(), &len, int res = ::uncompress((uchar*)d->data(), &len,
(uchar*)data+4, nbytes-4); (uchar*)data+4, nbytes-4);