steveire / grantlee

Libraries for text templating with Qt
Other
141 stars 48 forks source link

5.2.0: compile time warnings #72

Closed kloczek closed 2 years ago

kloczek commented 3 years ago

Summary stats:

[tkloczko@barrel SPECS]$ rpmbuild -ba --with check --with failing_tests grantlee-qt5.spec --quiet 2>&1 | grep -- -W | sed 's/.*\[//; s/\]//' | sort | uniq -c | sort -nr
      4 -Wdeprecated-declarations
      1 -Wstringop-overflow=
      1 -Wrange-loop-construct

And full log:

/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if_p.h: In member function 'QVariant IfToken::evaluate(Grantlee::Context*) const':
/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if_p.h:314:65: warning: 'bool QVariant::operator>(const QVariant&) const' is deprecated [-Wdeprecated-declarations]
  314 |       return mArgs.first->evaluate(c) > mArgs.second->evaluate(c);
      |                                                                 ^
In file included from /usr/include/qt5/QtCore/qlocale.h:43,
                 from /usr/include/qt5/QtCore/QLocale:1,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/abstractlocalizer.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/context.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/node.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.cpp:21:
/usr/include/qt5/QtCore/qvariant.h:471:31: note: declared here
  471 |     QT_DEPRECATED inline bool operator>(const QVariant &v) const
      |                               ^~~~~~~~
In file included from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.cpp:22:
/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if_p.h:316:66: warning: 'bool QVariant::operator>=(const QVariant&) const' is deprecated [-Wdeprecated-declarations]
  316 |       return mArgs.first->evaluate(c) >= mArgs.second->evaluate(c);
      |                                                                  ^
In file included from /usr/include/qt5/QtCore/qlocale.h:43,
                 from /usr/include/qt5/QtCore/QLocale:1,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/abstractlocalizer.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/context.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/node.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.cpp:21:
/usr/include/qt5/QtCore/qvariant.h:473:31: note: declared here
  473 |     QT_DEPRECATED inline bool operator>=(const QVariant &v) const
      |                               ^~~~~~~~
In file included from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.cpp:22:
/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if_p.h:318:65: warning: 'bool QVariant::operator<(const QVariant&) const' is deprecated [-Wdeprecated-declarations]
  318 |       return mArgs.first->evaluate(c) < mArgs.second->evaluate(c);
      |                                                                 ^
In file included from /usr/include/qt5/QtCore/qlocale.h:43,
                 from /usr/include/qt5/QtCore/QLocale:1,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/abstractlocalizer.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/context.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/node.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.cpp:21:
/usr/include/qt5/QtCore/qvariant.h:467:31: note: declared here
  467 |     QT_DEPRECATED inline bool operator<(const QVariant &v) const
      |                               ^~~~~~~~
In file included from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.cpp:22:
/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if_p.h:320:66: warning: 'bool QVariant::operator<=(const QVariant&) const' is deprecated [-Wdeprecated-declarations]
  320 |       return mArgs.first->evaluate(c) <= mArgs.second->evaluate(c);
      |                                                                  ^
In file included from /usr/include/qt5/QtCore/qlocale.h:43,
                 from /usr/include/qt5/QtCore/QLocale:1,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/abstractlocalizer.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/context.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/lib/node.h:26,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.h:24,
                 from /home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaulttags/if.cpp:21:
/usr/include/qt5/QtCore/qvariant.h:469:31: note: declared here
  469 |     QT_DEPRECATED inline bool operator<=(const QVariant &v) const
      |                               ^~~~~~~~
/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaultfilters/lists.cpp: In member function 'virtual QVariant MakeListFilter::doFilter(const QVariant&, const QVariant&, bool) const':
/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaultfilters/lists.cpp:199:26: warning: loop variable 'var' of type 'const QVariant&' binds to a temporary constructed from type 'QString' [-Wrange-loop-construct]
  199 |     for (const QVariant &var :
      |                          ^~~
/home/tkloczko/rpmbuild/BUILD/grantlee-5.2.0/templates/defaultfilters/lists.cpp:199:26: note: use non-reference type 'const QVariant' to make the copy explicit or 'const QString&' to prevent copying
/usr/include/qt5/QtCore/qvector.h: In member function 'append':
lto1: warning: writing 16 bytes into a region of size 8 [-Wstringop-overflow=]
/usr/include/qt5/QtCore/qarraydata.h:129:8: note: at offset [16, 24] into destination object '<anonymous>' of size 24
  129 | struct QTypedArrayData
      |        ^

BTW: do you have any plans to make new release? (5.2.1?)

steveire commented 2 years ago

This is a bug in Qt, so I don't think we can do much : https://www.mail-archive.com/development@qt-project.org/msg39450.html