summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2012-09-20 10:41:09 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-26 10:08:59 +0200
commit694e1b6381e9dc89ff580ab56ae40e43a246ba5e (patch)
treeab21949fc79ec54cd539d5c7ab67b3bfe401cd44 /src/corelib/tools
parent7ec788705fbd0b908c456f3a5b540d767f21ea08 (diff)
Core: Silence gcc warnings about unitinialized members in qarraydata.cpp
It's perfectly correct to leave members uninitialised, since they are zero initialized. Change-Id: I0d0c737cf35793a2633d44ce194af7f489903c03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qarraydata.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp
index b04914993b..f3d744714a 100644
--- a/src/corelib/tools/qarraydata.cpp
+++ b/src/corelib/tools/qarraydata.cpp
@@ -46,6 +46,11 @@
QT_BEGIN_NAMESPACE
+#if defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
const QArrayData QArrayData::shared_null[2] = {
{ Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared null
/* zero initialized terminator */};
@@ -55,6 +60,10 @@ static const QArrayData qt_array[3] = {
{ { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, sizeof(QArrayData) }, // unsharable empty
/* zero initialized terminator */};
+#if defined (__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) && !defined(Q_CC_INTEL)
+ #pragma GCC diagnostic pop
+#endif
+
static const QArrayData &qt_array_empty = qt_array[0];
static const QArrayData &qt_array_unsharable_empty = qt_array[1];