diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-11-28 10:05:15 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-11-29 07:47:59 +0000 |
commit | 0b64810ada26ea1e7d19342f05f97e870ed1db1b (patch) | |
tree | 37cd1a73bcf5f90d9fdf176700813bcaf720b664 /src/qml/jsruntime/qv4runtime.cpp | |
parent | 534262b63140c7a6d5d974e97d2164bb8023f449 (diff) |
fix uninitialized variable warnings
Task-number: QTBUG-64792
Change-Id: I890f2ed57393ea3fc1c5640c56ac04e284a4ce32
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index c41b720610..240fba7905 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -606,7 +606,7 @@ static Q_NEVER_INLINE ReturnedValue getElementFallback(ExecutionEngine *engine, ReturnedValue Runtime::method_loadElement(ExecutionEngine *engine, const Value &object, const Value &index) { - uint idx; + uint idx = 0; if (index.asArrayIndex(idx)) { if (Heap::Base *b = object.heapObject()) { if (b->vtable()->isObject) { @@ -632,7 +632,7 @@ static Q_NEVER_INLINE bool setElementFallback(ExecutionEngine *engine, const Val if (engine->hasException) return false; - uint idx; + uint idx = 0; if (index.asArrayIndex(idx)) { if (o->d()->arrayData && o->d()->arrayData->type == Heap::ArrayData::Simple) { Heap::SimpleArrayData *s = o->d()->arrayData.cast<Heap::SimpleArrayData>(); @@ -650,7 +650,7 @@ static Q_NEVER_INLINE bool setElementFallback(ExecutionEngine *engine, const Val bool Runtime::method_storeElement(ExecutionEngine *engine, const Value &object, const Value &index, const Value &value) { - uint idx; + uint idx = 0; if (index.asArrayIndex(idx)) { if (Heap::Base *b = object.heapObject()) { if (b->vtable()->isObject) { |