aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2013-12-04 15:34:07 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-17 10:51:25 +0100
commitda54d7f1a6f44a32c062094baf9ed1cb7156348d (patch)
treebea5a59cdcdabc4a603b00e8ae22635a9fbec9d6 /src/qml/qml
parent2833556a079defdb27c3dbe117ab66ea8080de75 (diff)
QQmlInstructionData: fix warning 'code' {is,might be} used uninit'ed
This is a compile-error for -release -developer-build builds. Change-Id: I7ea5363260ce35a013fbf6d1c538c763023a8dc0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlinstruction_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlinstruction_p.h b/src/qml/qml/qqmlinstruction_p.h
index bda8c3db0d..8b27cf06dd 100644
--- a/src/qml/qml/qqmlinstruction_p.h
+++ b/src/qml/qml/qqmlinstruction_p.h
@@ -151,8 +151,10 @@ QT_BEGIN_NAMESPACE
#ifdef QML_THREADED_VME_INTERPRETER
# define QML_INSTR_HEADER void *code;
+# define QML_INSTR_HEADER_INIT this->code = 0;
#else
# define QML_INSTR_HEADER quint8 instructionType;
+# define QML_INSTR_HEADER_INIT this->instructionType = 0;
#endif
#define QML_INSTR_ENUM(I, FMT) I,
@@ -547,6 +549,8 @@ FOR_EACH_QML_INSTR(QML_INSTR_META_TEMPLATE);
template<int Instr>
class QQmlInstructionData : public QQmlInstructionMeta<Instr>::DataType
{
+public:
+ QQmlInstructionData() : QQmlInstructionMeta<Instr>::DataType() { QML_INSTR_HEADER_INIT }
};
QT_END_NAMESPACE