Squish: Init token variable

Otherwise it may be uninitialized when while loop finishes
immediately.

Change-Id: I7638025813d4353abc864e106ef0e09c7c218409
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Jarek Kobus
2022-11-30 00:04:36 +01:00
parent 72a01bd00e
commit 05189a676f

View File

@@ -92,7 +92,7 @@ void SquishXmlOutputHandler::mergeResultFiles(const Utils::FilePaths &reportFile
// and finally write test tag (case name) - the prolog tag (for test case) // and finally write test tag (case name) - the prolog tag (for test case)
// will be written outside the if // will be written outside the if
const QXmlStreamAttributes testAttributes = reader.attributes(); const QXmlStreamAttributes testAttributes = reader.attributes();
QXmlStreamReader::TokenType token; QXmlStreamReader::TokenType token = QXmlStreamReader::NoToken;
while (!reader.atEnd()) { while (!reader.atEnd()) {
token = reader.readNext(); token = reader.readNext();
if (token != QXmlStreamReader::Characters) if (token != QXmlStreamReader::Characters)