diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-03-10 16:15:41 +0100 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-03-16 22:39:00 +0100 |
commit | 32b49e1a3889f825a88b18b00eca045d5758f12a (patch) | |
tree | 67b0c3e799ca2b29bd8c1625603cb64986206c4a /src/quick/scenegraph/coreapi/qsgnode.h | |
parent | ef7c39ecf56cf4a9141f5021233078410d0901e1 (diff) |
Silence some unused-variable and unused-private-field warning
Otherwise, they tend to break the unity build. Since we are
compiling with "-Wattributes", and GCC doesn't warn about
unused variable, having the [[maybe_unused]] leads to an
error, and not having it fails the unity build with other
compilers. As a result, we need the condition to ignore
the flag, and set it again afterward.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ia7662a0cfc01de7c9188d37449abdd91e6110fa1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgnode.h')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgnode.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgnode.h b/src/quick/scenegraph/coreapi/qsgnode.h index 659d085922..4655c6bd1d 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.h +++ b/src/quick/scenegraph/coreapi/qsgnode.h @@ -175,8 +175,11 @@ private: QSGGeometry *m_geometry; - int m_reserved_start_index; - int m_reserved_end_index; + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wattributes") + [[maybe_unused]] int m_reserved_start_index; + [[maybe_unused]] int m_reserved_end_index; + QT_WARNING_POP const QMatrix4x4 *m_matrix; const QSGClipNode *m_clip_list; |