diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-03-31 20:23:27 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-20 04:09:59 +0000 |
commit | ca4dbd5675ad3aabffb9fb92f19b53b4c5028981 (patch) | |
tree | 80a1c877186f611174d2ee640a23f431fe48cded | |
parent | aa1524a4dde5098da2c9e40eb60bbaecf69bbe1c (diff) |
Address uninitialized pointer variables
Coverity CID 10721, 84861, 86705, 85424, 85422,
85259, 84863, 84857
Change-Id: Ia86970b5ac4e0be9de01b79b618d33011da6a328
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r-- | examples/quick/rendercontrol/cuberenderer.cpp | 4 | ||||
-rw-r--r-- | examples/quick/rendercontrol/window_multithreaded.cpp | 10 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4errorobject.cpp | 1 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 7 | ||||
-rw-r--r-- | src/qml/qml/qqmlcontextwrapper.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmltypewrapper.cpp | 3 | ||||
-rw-r--r-- | tools/qmlscene/main.cpp | 1 |
7 files changed, 23 insertions, 4 deletions
diff --git a/examples/quick/rendercontrol/cuberenderer.cpp b/examples/quick/rendercontrol/cuberenderer.cpp index be503e3d8f..1b2d7dec8f 100644 --- a/examples/quick/rendercontrol/cuberenderer.cpp +++ b/examples/quick/rendercontrol/cuberenderer.cpp @@ -52,7 +52,9 @@ CubeRenderer::CubeRenderer(QOffscreenSurface *offscreenSurface) : m_offscreenSurface(offscreenSurface), m_context(0), m_program(0), - m_vbo(0) + m_vbo(0), + m_vao(0), + m_matrixLoc(0) { } diff --git a/examples/quick/rendercontrol/window_multithreaded.cpp b/examples/quick/rendercontrol/window_multithreaded.cpp index 6c0de93a19..9b6020a347 100644 --- a/examples/quick/rendercontrol/window_multithreaded.cpp +++ b/examples/quick/rendercontrol/window_multithreaded.cpp @@ -77,7 +77,12 @@ static const QEvent::Type STOP = QEvent::Type(QEvent::User + 4); static const QEvent::Type UPDATE = QEvent::Type(QEvent::User + 5); QuickRenderer::QuickRenderer() - : m_fbo(0), + : m_context(0), + m_surface(0), + m_fbo(0), + m_window(0), + m_quickWindow(0), + m_renderControl(0), m_cubeRenderer(0), m_quit(false) { @@ -209,7 +214,8 @@ void QuickRenderer::aboutToQuit() } WindowMultiThreaded::WindowMultiThreaded() - : m_rootItem(0), + : m_qmlComponent(Q_NULLPTR), + m_rootItem(0), m_quickInitialized(false), m_psrRequested(false) { diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp index 119ad93e63..9034dee6a0 100644 --- a/src/qml/jsruntime/qv4errorobject.cpp +++ b/src/qml/jsruntime/qv4errorobject.cpp @@ -60,6 +60,7 @@ using namespace QV4; Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype) : Heap::Object(ic, prototype) + , stack(Q_NULLPTR) { Scope scope(ic->engine); Scoped<QV4::ErrorObject> e(scope, this); diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 7006a8892d..0a12d013ac 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -65,6 +65,7 @@ DEFINE_OBJECT_VTABLE(FunctionObject); Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, QV4::String *name, bool createProto) : Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject()) , scope(scope->d()) + , function(Q_NULLPTR) { Scope s(scope->engine()); ScopedFunctionObject f(s, this); @@ -74,6 +75,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, QV4::String * Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, Function *function, bool createProto) : Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject()) , scope(scope->d()) + , function(Q_NULLPTR) { Scope s(scope->engine()); ScopedString name(s, function->name()); @@ -84,6 +86,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, Function *fun Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const QString &name, bool createProto) : Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject()) , scope(scope->d()) + , function(Q_NULLPTR) { Scope s(scope->engine()); ScopedFunctionObject f(s, this); @@ -94,6 +97,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const QString Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const QString &name, bool createProto) : Heap::Object(scope->engine->functionClass, scope->engine->functionPrototype.asObject()) , scope(scope) + , function(Q_NULLPTR) { Scope s(scope->engine); ScopedFunctionObject f(s, this); @@ -104,6 +108,7 @@ Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const QString &nam Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const ReturnedValue name) : Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject()) , scope(scope->d()) + , function(Q_NULLPTR) { Scope s(scope); ScopedFunctionObject f(s, this); @@ -114,6 +119,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const Returne Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValue name) : Heap::Object(scope->engine->functionClass, scope->engine->functionPrototype.asObject()) , scope(scope) + , function(Q_NULLPTR) { Scope s(scope->engine); ScopedFunctionObject f(s, this); @@ -124,6 +130,7 @@ Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValu Heap::FunctionObject::FunctionObject(InternalClass *ic, QV4::Object *prototype) : Heap::Object(ic, prototype) , scope(ic->engine->rootContext()) + , function(Q_NULLPTR) { Scope scope(ic->engine); ScopedObject o(scope, this); diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index b2d03bc188..5844eab54f 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -60,6 +60,7 @@ Heap::QmlContextWrapper::QmlContextWrapper(QV4::ExecutionEngine *engine, QQmlCon , isNullWrapper(false) , context(context) , scopeObject(scopeObject) + , idObjectsWrapper(Q_NULLPTR) { } diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp index 13266135b3..8a2118ef27 100644 --- a/src/qml/qml/qqmltypewrapper.cpp +++ b/src/qml/qml/qqmltypewrapper.cpp @@ -51,6 +51,9 @@ DEFINE_OBJECT_VTABLE(QmlTypeWrapper); Heap::QmlTypeWrapper::QmlTypeWrapper(ExecutionEngine *engine) : Heap::Object(engine) , mode(IncludeEnums) + , type(Q_NULLPTR) + , typeNamespace(Q_NULLPTR) + , importNamespace(Q_NULLPTR) { } diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index 3a1815caa6..b8920cd853 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -158,7 +158,6 @@ struct Options bool maximized; bool fullscreen; bool transparent; - bool scenegraphOnGraphicsview; bool clip; bool versionDetection; bool slowAnimations; |