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. Change-Id: I2de810aded1226ce4e5651de8c2e9464de3f274f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f71f0312d66c4e937c7ce13972617c393e96cabb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
0b1fdf1185
commit
95fa5e33d0
@ -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…
x
Reference in New Issue
Block a user