aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2022-04-28 10:09:34 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-08 00:40:35 +0000
commitfdf0333a6cfd9f0c02916f40900d44275e2d70c0 (patch)
treea2bf1c48a0266efd240a34c64daeae831691b1ce
parent444810849bcafe5d52927a2ae2f972d087d36193 (diff)
jsruntime: silence msvc warning 4201 (nameless struct/union)
qml's private headers are pulled into binaries when using the qml compiler. we should keep the warnings out of downstream code Change-Id: I330b5f76d7846b5f2e5f2a4c1ece95b58c67a876 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 986d5395bd8542c181298faf4916ac5d6f9c6ce1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5534e6271010c49619a3f7f83a1f297ba153f167) (cherry picked from commit 5ea5e8bfd5147895cf8e998505ba3bf1146580d3)
-rw-r--r--src/qml/jsruntime/qv4global_p.h3
-rw-r--r--src/qml/jsruntime/qv4stackframe_p.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index f9b348a1b7..103b0bacc8 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -191,6 +191,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(PropertyFlags)
struct PropertyAttributes
{
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_MSVC(4201) // nonstandard extension used: nameless struct/union
union {
uchar m_all;
struct {
@@ -208,6 +210,7 @@ struct PropertyAttributes
uchar configurable_set : 1;
};
};
+ QT_WARNING_POP
enum Type {
Data = 0,
diff --git a/src/qml/jsruntime/qv4stackframe_p.h b/src/qml/jsruntime/qv4stackframe_p.h
index 5bd7794efe..8bb708638a 100644
--- a/src/qml/jsruntime/qv4stackframe_p.h
+++ b/src/qml/jsruntime/qv4stackframe_p.h
@@ -35,6 +35,8 @@ struct Q_QML_PRIVATE_EXPORT CppStackFrameBase
int originalArgumentsCount;
int instructionPointer;
+ QT_WARNING_PUSH
+ QT_WARNING_DISABLE_MSVC(4201) // nonstandard extension used: nameless struct/union
union {
struct {
Value *savedStackTop;
@@ -57,6 +59,7 @@ struct Q_QML_PRIVATE_EXPORT CppStackFrameBase
bool returnValueIsUndefined;
};
};
+ QT_WARNING_POP
Kind kind;
};