diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-07-03 18:01:16 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-07-03 19:21:17 +0200 |
commit | f71f0312d66c4e937c7ce13972617c393e96cabb (patch) | |
tree | 7730715a2c0080d193dc1d0eb81c9dae0c8cc930 /src/corelib/kernel/qcoreevent.h | |
parent | c90cc8c900b81eb75ba443e2be7a01d4a946fe70 (diff) |
QEvent: add strategic [[maybe_unused]] to Q_IMPL_EVENT_COMMON
Apparently, in unity-builds Q_ASSERT does not always compile its
argument, so I'm getting -Werror,-Wunused-variable on Clang 15.
Fix by adding [[maybe_unused]].
Amends da0f72ebb817bb9c92c7a183b281d8a4bf31a135.
Pick-to: 6.6 6.5
Change-Id: I2de810aded1226ce4e5651de8c2e9464de3f274f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qcoreevent.h')
-rw-r--r-- | src/corelib/kernel/qcoreevent.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h index 3acaa62a45..93ab1c1871 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -34,7 +34,7 @@ protected: \ Class* Class::clone() const \ { \ auto c = new Class(*this); \ - QEvent *e = c; \ + [[maybe_unused]] QEvent *e = c; \ /* check that covariant return is safe to add */ \ Q_ASSERT(reinterpret_cast<quintptr>(c) == reinterpret_cast<quintptr>(e)); \ return c; \ |