From 17ee7807e2218b84b07ac9dae4cc6ddb2381906d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 8 May 2012 17:27:52 +0200 Subject: [PATCH] Fix MSVC warning C4200 (zero-sized array in struct/union). Warning C4200: nonstandard extension used : zero-sized array in struct/union. Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array. Change-Id: Icf23b367b88a4a4f9549cc714af2a30287027da8 Reviewed-by: Aaron Kennedy --- src/qml/qml/qqmlbundle_p.h | 5 +++++ src/qml/qml/qqmlpropertycache.cpp | 5 +++++ src/qml/qml/v4/qv4program_p.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/src/qml/qml/qqmlbundle_p.h b/src/qml/qml/qqmlbundle_p.h index 029acf1..f09447c 100644 --- a/src/qml/qml/qqmlbundle_p.h +++ b/src/qml/qml/qqmlbundle_p.h @@ -46,6 +46,11 @@ #include #include +#ifdef Q_CC_MSVC +// nonstandard extension used : zero-sized array in struct/union. +# pragma warning( disable : 4200 ) +#endif + QT_BEGIN_NAMESPACE class Q_QML_EXPORT QQmlBundle diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 1e8cfb6..4bfe8ae 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -52,6 +52,11 @@ #include // for toupper +#ifdef Q_CC_MSVC +// nonstandard extension used : zero-sized array in struct/union. +# pragma warning( disable : 4200 ) +#endif + Q_DECLARE_METATYPE(QJSValue) Q_DECLARE_METATYPE(QQmlV8Handle); diff --git a/src/qml/qml/v4/qv4program_p.h b/src/qml/qml/v4/qv4program_p.h index 9ac02f1..3fb1670 100644 --- a/src/qml/qml/v4/qv4program_p.h +++ b/src/qml/qml/v4/qv4program_p.h @@ -55,6 +55,11 @@ #include "qv4instruction_p.h" +#ifdef Q_CC_MSVC +// nonstandard extension used : zero-sized array in struct/union. +# pragma warning( disable : 4200 ) +#endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -- 2.7.4