summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2013-04-18 23:37:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-05 18:24:10 +0200
commit805031814b789326328dd5e757226f86ec1daf26 (patch)
tree81f1429401b89ef691eb99487b30df740e56b45f
parentfd956af25745854690bb2d1f0837bf8386c8bc1d (diff)
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>
-rw-r--r--src/corelib/tools/qbytearray.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index dc3f5f3be9..14e6b050f2 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -556,6 +556,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
d.take(); // realloc was successful
d.reset(p);
d->offset = sizeof(QByteArrayData);
+ d->size = 0; // Shut up valgrind "uninitialized variable" warning
int res = ::uncompress((uchar*)d->data(), &len,
(uchar*)data+4, nbytes-4);