[Development] Q_OBJECT_CHECK / Q_OBJECT triggers warning in clang: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
Laszlo Papp
lpapp at kde.org
Sun Jul 21 23:55:18 CEST 2013
On Sun, Jul 21, 2013 at 10:44 PM, Milian Wolff <mail at milianw.de> wrote:
> #define Q_OBJECT_CHECK \
> template <typename T> inline void qt_check_for_QOBJECT_macro(const T
> &_q_argument) const \
> { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; }
>
> see the "i = i". Is that just to ensure it's not marked as unused? Could
> something be done about it? Maybe the (void) i "trick" that Q_UNUSED
> applies?
>
Probably not. It might make more sense to cherry-pick this back to Qt4
instead: https://codereview.qt-project.org/#change,4960
Laszlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130721/6437f7fd/attachment.html>
More information about the Development
mailing list