From 38d56e2b72f61c662d79b8aad9dff4f4f1a0211a Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Thu, 13 Apr 2023 13:02:08 +0200 Subject: [PATCH] Add [[maybe_unused]] attribute to an unused variable Otherwise, it could break the unity build. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ic1b3ac51b8a9e8bb93a3b1a4d6717fa45099e91b Reviewed-by: Alexandru Croitor --- src/widgets/kernel/qgesturemanager_p.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qgesturemanager_p.h b/src/widgets/kernel/qgesturemanager_p.h index 1bf1358b13..32f1c2aba3 100644 --- a/src/widgets/kernel/qgesturemanager_p.h +++ b/src/widgets/kernel/qgesturemanager_p.h @@ -64,13 +64,16 @@ private: QSet m_activeGestures; QSet m_maybeGestures; - enum State { + QT_WARNING_PUSH + QT_WARNING_DISABLE_GCC("-Wattributes") + [[maybe_unused]] enum State { Gesture, NotGesture, MaybeGesture // this means timers are up and waiting for some // more events, and input events are handled by // gesture recognizer explicitly } state; + QT_WARNING_POP struct ObjectGesture {