From: Friedemann Kleint Date: Tue, 8 May 2012 15:27:52 +0000 (+0200) Subject: Fix MSVC warning C4200 (zero-sized array in struct/union). X-Git-Tag: upstream/5.2.1~1945 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17ee7807e2218b84b07ac9dae4cc6ddb2381906d;p=platform%2Fupstream%2Fqtdeclarative.git 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 --- 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