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 da0f72ebb8.
Pick-to: 6.6 6.5
Change-Id: I2de810aded1226ce4e5651de8c2e9464de3f274f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
parent
c90cc8c900
commit
f71f0312d6
|
|
@ -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; \
|
||||
|
|
|
|||
Loading…
Reference in New Issue