From d4b2f0eec8e328818973c1852c19fc7ef45efb5f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 29 May 2012 09:04:05 +1000 Subject: [PATCH] Initialize data members in QML engine Found by static analysis. None look suspicious, but worthwhile cleaning up. Change-Id: Icb5046eb9e57493a9c68b3509ca0c7f546480b73 Reviewed-by: Chris Adams --- src/qml/qml/parser/qqmljsparser.cpp | 1 + src/qml/qml/qqmlcompiler.cpp | 2 +- src/qml/qml/qqmlcompiler_p.h | 2 +- src/qml/qml/qqmlpropertyvalueinterceptor.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qml/qml/parser/qqmljsparser.cpp b/src/qml/qml/parser/qqmljsparser.cpp index bc89b2a..e2483c0 100644 --- a/src/qml/qml/parser/qqmljsparser.cpp +++ b/src/qml/qml/parser/qqmljsparser.cpp @@ -85,6 +85,7 @@ Parser::Parser(Engine *engine): state_stack(0), location_stack(0), string_stack(0), + program(0), first_token(0), last_token(0) { diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 2e26d94..6e27995 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -99,7 +99,7 @@ static QString qsTrId_string(QLatin1String("qsTrId")); Instantiate a new QQmlCompiler. */ QQmlCompiler::QQmlCompiler(QQmlPool *pool) -: pool(pool), output(0), engine(0), unitRoot(0), unit(0), cachedComponentTypeRef(-1), +: compileState(0), pool(pool), output(0), engine(0), enginePrivate(0), unitRoot(0), unit(0), cachedComponentTypeRef(-1), cachedTranslationContextIndex(-1), componentStats(0) { if (compilerStatDump()) diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h index c5d319c..f63c2cf 100644 --- a/src/qml/qml/qqmlcompiler_p.h +++ b/src/qml/qml/qqmlcompiler_p.h @@ -437,7 +437,7 @@ private: // Compiler component statistics. Only collected if QML_COMPILER_STATS=1 struct ComponentStat { - ComponentStat() : ids(0), objects(0) {} + ComponentStat() : lineNumber(0), ids(0), objects(0) {} int lineNumber; diff --git a/src/qml/qml/qqmlpropertyvalueinterceptor.cpp b/src/qml/qml/qqmlpropertyvalueinterceptor.cpp index 331b90d..31319db 100644 --- a/src/qml/qml/qqmlpropertyvalueinterceptor.cpp +++ b/src/qml/qml/qqmlpropertyvalueinterceptor.cpp @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE /*! Constructs a QQmlPropertyValueInterceptor. */ -QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor() +QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor() : m_next(0) { } -- 2.7.4