Commit f63d6433 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Avoid zero-sized arrays



Change-Id: Ia17d067ed677cd3a63d8a478ecb9abec91032771
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 2c2b1722
......@@ -214,13 +214,14 @@ private:
qint64 m_timestamp;
qint64 m_duration;
static const int s_internalDataLength = 8;
union {
void *external;
char internalChar [sizeof(external)];
qint8 internal8bit [sizeof(external)];
qint16 internal16bit[sizeof(external) / 2];
qint32 internal32bit[sizeof(external) / 4];
qint64 internal64bit[sizeof(external) / 8];
char internalChar [s_internalDataLength];
qint8 internal8bit [s_internalDataLength];
qint16 internal16bit[s_internalDataLength / 2];
qint32 internal32bit[s_internalDataLength / 4];
qint64 internal64bit[s_internalDataLength / 8];
} m_data;
qint32 m_typeIndex;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment