From e7e87993042ac9a4fd899da5ea0340322b47d9ff Mon Sep 17 00:00:00 2001 From: Nick Ratelle Date: Fri, 6 Jan 2012 12:19:27 -0500 Subject: [PATCH] Initializes seqDumpPos on qiodevice.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was spotted by RIM static code checking team. seqDumpPos is a dummy variable which is only used on sequential mode. It is used as a simultaneous storage area of both pPos and pDevicePos when in sequential mode, to keep both in sync. They just suggested that it would be a good practice to initialize the variable, since it does not have any side effect, and there's not much value on not doing it. Change-Id: I8138729eb31df5779c91b368c2cfaecd39788f29 Reviewed-by: João Abecasis Reviewed-by: Jonas Gastal --- src/corelib/io/qiodevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 0ad1a91d6c..3d9391ebaa 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -118,7 +118,7 @@ void debugBinaryString(const char *data, qint64 maxlen) */ QIODevicePrivate::QIODevicePrivate() : openMode(QIODevice::NotOpen), buffer(QIODEVICE_BUFFERSIZE), - pos(0), devicePos(0) + pos(0), devicePos(0), seqDumpPos(0) , pPos(&pos), pDevicePos(&devicePos) , baseReadLineDataCalled(false) , firstRead(true) @@ -562,6 +562,7 @@ void QIODevice::close() d->openMode = NotOpen; d->errorString.clear(); d->pos = 0; + d->seqDumpPos = 0; d->buffer.clear(); d->firstRead = true; }