summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorNick Ratelle <nratelle@qnx.com>2012-01-06 12:19:27 -0500
committerQt by Nokia <qt-info@nokia.com>2012-02-09 17:45:38 +0100
commite7e87993042ac9a4fd899da5ea0340322b47d9ff (patch)
tree49fa83359e32ef857e041bbfb5a8551aa9a0926a /src/corelib/io
parentd5268eabfbad3743c47cf7a6aaf98ef7029d2ef1 (diff)
Initializes seqDumpPos on qiodevice.cpp
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 <joao.abecasis@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qiodevice.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}