Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
5.6
-
None
-
Linux, sb2, armv7hl, Qt 5.6.
Description
I have tried to add my usual flags for c++ apps but I was unable to compile my project which uses Qt 5.6 and it seems I can not fix these errors at all because they all come from Qt 5.6 itself. First errors:
In file included from /usr/include/qt5/QtCore/qhash.h:40:0, from /usr/include/qt5/QtCore/qshareddata.h:40, from /usr/include/qt5/QtCore/qdatetime.h:39, from /usr/include/qt5/QtCore/QDateTime:1, from database.h:11, from database.cpp:1: /usr/include/qt5/QtCore/qlist.h: In instantiation of ‘void QList<T>::node_destruct(QList<T>::Node*, QList<T>::Node*) [with T = QVariant]’: /usr/include/qt5/QtCore/qlist.h:856:68: required from ‘void QList<T>::dealloc(QListData::Data*) [with T = QVariant]’ /usr/include/qt5/QtCore/qlist.h:817:18: required from ‘QList<T>::~QList() [with T = QVariant]’ /usr/include/qt5/QtCore/qvariant.h:755:30: required from here /usr/include/qt5/QtCore/qlist.h:486:58: error: cast from ‘QList<QVariant>::Node*’ to ‘QVariant*’ increases required alignment of target type [-Werror=cast-align] while (from != to) --to, reinterpret_cast<T*>(to)->~T(); ^ /usr/include/qt5/QtCore/qlist.h: In instantiation of ‘void QList<T>::node_copy(QList<T>::Node*, QList<T>::Node*, QList<T>::Node*) [with T = QVariant]’: /usr/include/qt5/QtCore/qlist.h:778:92: required from ‘void QList<T>::detach_helper(int) [with T = QVariant]’ /usr/include/qt5/QtCore/qlist.h:562:32: required from ‘void QList<T>::reserve(int) [with T = QVariant]’ /usr/include/qt5/QtCore/qvariant.h:756:38: required from here /usr/include/qt5/QtCore/qlist.h:465:17: error: cast from ‘QList<QVariant>::Node*’ to ‘QVariant*’ increases required alignment of target type [-Werror=cast-align] new (current) T(*reinterpret_cast<T*>(src)); ^ /usr/include/qt5/QtCore/qlist.h:471:48: error: cast from ‘QList<QVariant>::Node*’ to ‘QVariant*’ increases required alignment of target type [-Werror=cast-align] (reinterpret_cast<T*>(current))->~T(); ^ /usr/include/qt5/QtCore/qlist.h: In instantiation of ‘void QList<T>::node_destruct(QList<T>::Node*) [with T = QVariant]’: /usr/include/qt5/QtCore/qlist.h:594:36: required from ‘void QList<T>::append(const T&) [with T = QVariant]’ /usr/include/qt5/QtCore/qlist.h:376:15: required from ‘QList<T>& QList<T>::operator<<(const T&) [with T = QVariant]’ /usr/include/qt5/QtCore/qvariant.h:758:27: required from here /usr/include/qt5/QtCore/qlist.h:442:62: error: cast from ‘QList<QVariant>::Node*’ to ‘QVariant*’ increases required alignment of target type [-Werror=cast-align] else if (QTypeInfo<T>::isComplex) reinterpret_cast<T*>(n)->~T(); ^ In file included from /usr/include/qt5/QtCore/qshareddata.h:40:0, from /usr/include/qt5/QtCore/qdatetime.h:39, from /usr/include/qt5/QtCore/QDateTime:1, from database.h:11, from database.cpp:1: /usr/include/qt5/QtCore/qhash.h: In instantiation of ‘static QHash<Key, T>::Node* QHash<Key, T>::concrete(QHashData::Node*) [with Key = QString; T = QVariant; QHash<Key, T>::Node = QHashNode<QString, QVariant>]’: /usr/include/qt5/QtCore/qhash.h:519:18: required from ‘static void QHash<Key, T>::deleteNode2(QHashData::Node*) [with Key = QString; T = QVariant]’ /usr/include/qt5/QtCore/qhash.h:555:5: required from ‘void QHash<Key, T>::freeData(QHashData*) [with Key = QString; T = QVariant]’ /usr/include/qt5/QtCore/qhash.h:246:47: required from ‘QHash<Key, T>::~QHash() [with Key = QString; T = QVariant]’ /usr/include/qt5/QtCore/qvariant.h:772:30: required from here /usr/include/qt5/QtCore/qhash.h:229:45: error: cast from ‘QHashData::Node*’ to ‘QHash<QString, QVariant>::Node* {aka QHashNode<QString, QVariant>*}’ increases required alignment of target type [-Werror=cast-align] return reinterpret_cast<Node *>(node); ^ cc1plus: all warnings being treated as errors
Second:
database.cpp: In function ‘T {anonymous}::_getRpmHeaderField(Header, int) [with T = QDateTime; Header = headerToken_s*]’: database.cpp:87:29: error: conversion to ‘uint {aka unsigned int}’ from ‘time_t {aka long int}’ may change the sign of the result [-Werror=sign-conversion] value.setTime_t(time); ^
I can not fix the error above because it is platform-depenend typedef to time_t and so `setTime_t` must accept exactly system's `time_t` type but it seems it does not do that. Also, I have found that this method is marked obsolete in Qt 5.8 but unfortunately we still use Qt 5.6. Okay, I may do a workaround and don't use this `setTime_t` method at all, but this is still not the end...:
In file included from /usr/include/qt5/QtCore/qstring.h:42:0, from /usr/include/qt5/QtCore/QString:1, from database.h:10, from database.cpp:1: /usr/include/qt5/QtCore/qbytearray.h: In member function ‘QByteRef QByteArray::operator[](uint)’: /usr/include/qt5/QtCore/qbytearray.h:554:27: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return QByteRef(*this, i); } ^ /usr/include/qt5/QtCore/qbytearray.h: In function ‘bool operator==(const QByteArray&, const QByteArray&)’: /usr/include/qt5/QtCore/qbytearray.h:594:86: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return (a1.size() == a2.size()) && (memcmp(a1.constData(), a2.constData(), a1.size())==0); } ^ /usr/include/qt5/QtCore/qbytearray.h: In member function ‘QByteArray& QByteArray::replace(char, const char*)’: /usr/include/qt5/QtCore/qbytearray.h:644:42: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return replace(&before, 1, c, qstrlen(c)); } ^ /usr/include/qt5/QtCore/qbytearray.h: In member function ‘QByteArray& QByteArray::replace(const QByteArray&, const char*)’: /usr/include/qt5/QtCore/qbytearray.h:646:65: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return replace(before.constData(), before.size(), c, qstrlen(c)); } ^ /usr/include/qt5/QtCore/qbytearray.h: In member function ‘QByteArray& QByteArray::replace(const char*, const char*)’: /usr/include/qt5/QtCore/qbytearray.h:648:40: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return replace(before, qstrlen(before), after, qstrlen(after)); } ^ /usr/include/qt5/QtCore/qbytearray.h:648:63: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return replace(before, qstrlen(before), after, qstrlen(after)); } ^ /usr/include/qt5/QtCore/qbytearray.h: In member function ‘std::string QByteArray::toStdString() const’: /usr/include/qt5/QtCore/qbytearray.h:662:42: error: conversion to ‘std::basic_string<char>::size_type {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return std::string(constData(), length()); } ^ In file included from /usr/include/qt5/QtCore/QString:1:0, from database.h:10, from database.cpp:1: /usr/include/qt5/QtCore/qstring.h: In constructor ‘QLatin1String::QLatin1String(const QByteArray&)’: /usr/include/qt5/QtCore/qstring.h:89:115: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] inline explicit QLatin1String(const QByteArray &s) Q_DECL_NOTHROW : m_size(int(qstrnlen(s.constData(), s.size()))), m_data(s.constData()) {} ^ /usr/include/qt5/QtCore/qstring.h: In static member function ‘static QString QString::fromLatin1(const QByteArray&)’: /usr/include/qt5/QtCore/qstring.h:542:99: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return str.isNull() ? QString() : fromLatin1(str.data(), qstrnlen(str.constData(), str.size())); } ^ /usr/include/qt5/QtCore/qstring.h:542:100: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return str.isNull() ? QString() : fromLatin1(str.data(), qstrnlen(str.constData(), str.size())); } ^ /usr/include/qt5/QtCore/qstring.h: In static member function ‘static QString QString::fromUtf8(const QByteArray&)’: /usr/include/qt5/QtCore/qstring.h:544:97: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return str.isNull() ? QString() : fromUtf8(str.data(), qstrnlen(str.constData(), str.size())); } ^ /usr/include/qt5/QtCore/qstring.h:544:98: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return str.isNull() ? QString() : fromUtf8(str.data(), qstrnlen(str.constData(), str.size())); } ^ /usr/include/qt5/QtCore/qstring.h: In static member function ‘static QString QString::fromLocal8Bit(const QByteArray&)’: /usr/include/qt5/QtCore/qstring.h:546:102: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return str.isNull() ? QString() : fromLocal8Bit(str.data(), qstrnlen(str.constData(), str.size())); } ^ /usr/include/qt5/QtCore/qstring.h:546:103: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return str.isNull() ? QString() : fromLocal8Bit(str.data(), qstrnlen(str.constData(), str.size())); } ^ /usr/include/qt5/QtCore/qstring.h: In constructor ‘QString::QString(const QByteArray&)’: /usr/include/qt5/QtCore/qstring.h:658:76: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size()))) ^ /usr/include/qt5/QtCore/qstring.h:658:77: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size()))) ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘int QString::toWCharArray(wchar_t*) const’: /usr/include/qt5/QtCore/qstring.h:954:55: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] memcpy(array, d->data(), sizeof(QChar) * size()); ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘void QString::reserve(int)’: /usr/include/qt5/QtCore/qstring.h:1070:44: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] reallocData(qMax(asize, d->size) + 1u); ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘QCharRef QString::operator[](uint)’: /usr/include/qt5/QtCore/qstring.h:1095:27: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return QCharRef(*this, i); } ^ /usr/include/qt5/QtCore/qstring.h: In function ‘bool operator==(QLatin1String, QLatin1String)’: /usr/include/qt5/QtCore/qstring.h:1130:79: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return (s1.size() == s2.size() && !memcmp(s1.latin1(), s2.latin1(), s1.size())); } ^ /usr/include/qt5/QtCore/qstring.h: In function ‘bool operator!=(QLatin1String, QLatin1String)’: /usr/include/qt5/QtCore/qstring.h:1132:78: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return (s1.size() != s2.size() || memcmp(s1.latin1(), s2.latin1(), s1.size())); } ^ /usr/include/qt5/QtCore/qstring.h: In function ‘bool operator<(QLatin1String, QLatin1String)’: /usr/include/qt5/QtCore/qstring.h:1134:70: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); ^ /usr/include/qt5/QtCore/qstring.h: In function ‘bool operator<=(QLatin1String, QLatin1String)’: /usr/include/qt5/QtCore/qstring.h:1137:70: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); ^ /usr/include/qt5/QtCore/qstring.h: In function ‘bool operator>(QLatin1String, QLatin1String)’: /usr/include/qt5/QtCore/qstring.h:1140:70: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); ^ /usr/include/qt5/QtCore/qstring.h: In function ‘bool operator>=(QLatin1String, QLatin1String)’: /usr/include/qt5/QtCore/qstring.h:1143:70: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { int r = memcmp(s1.latin1(), s2.latin1(), qMin(s1.size(), s2.size())); ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘bool QString::operator==(const QByteArray&) const’: /usr/include/qt5/QtCore/qstring.h:1226:101: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(constData(), size(), s.constData(), qstrnlen(s.constData(), s.size())) == 0; } ^ /usr/include/qt5/QtCore/qstring.h:1226:102: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(constData(), size(), s.constData(), qstrnlen(s.constData(), s.size())) == 0; } ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘bool QString::operator!=(const QByteArray&) const’: /usr/include/qt5/QtCore/qstring.h:1228:101: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(constData(), size(), s.constData(), qstrnlen(s.constData(), s.size())) != 0; } ^ /usr/include/qt5/QtCore/qstring.h:1228:102: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(constData(), size(), s.constData(), qstrnlen(s.constData(), s.size())) != 0; } ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘bool QByteArray::operator==(const QString&) const’: /usr/include/qt5/QtCore/qstring.h:1239:99: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(s.constData(), s.size(), constData(), qstrnlen(constData(), size())) == 0; } ^ /usr/include/qt5/QtCore/qstring.h:1239:100: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(s.constData(), s.size(), constData(), qstrnlen(constData(), size())) == 0; } ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘bool QByteArray::operator!=(const QString&) const’: /usr/include/qt5/QtCore/qstring.h:1241:99: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(s.constData(), s.size(), constData(), qstrnlen(constData(), size())) != 0; } ^ /usr/include/qt5/QtCore/qstring.h:1241:100: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] { return QString::compare_helper(s.constData(), s.size(), constData(), qstrnlen(constData(), size())) != 0; } ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘std::wstring QString::toStdWString() const’: /usr/include/qt5/QtCore/qstring.h:1303:23: error: conversion to ‘std::basic_string<wchar_t>::size_type {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] str.resize(length()); ^ /usr/include/qt5/QtCore/qstring.h:1311:44: error: conversion to ‘std::basic_string<wchar_t>::size_type {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] str.resize(toWCharArray(&(*str.begin()))); ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘std::u16string QString::toStdU16String() const’: /usr/include/qt5/QtCore/qstring.h:1323:76: error: conversion to ‘std::basic_string<char16_t>::size_type {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] { return std::u16string(reinterpret_cast<const char16_t*>(utf16()), length()); } ^ /usr/include/qt5/QtCore/qstring.h: In member function ‘std::u32string QString::toStdU32String() const’: /usr/include/qt5/QtCore/qstring.h:1330:34: error: conversion to ‘std::basic_string<char32_t>::size_type {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] std::u32string u32str(length(), char32_t(0)); ^ /usr/include/qt5/QtCore/qstring.h:1332:22: error: conversion to ‘std::basic_string<char32_t>::size_type {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] u32str.resize(len); ^ In file included from /usr/include/qt5/QtCore/qlist.h:37:0, from /usr/include/qt5/QtCore/qhash.h:40, from /usr/include/qt5/QtCore/qshareddata.h:40, from /usr/include/qt5/QtCore/qdatetime.h:39, from /usr/include/qt5/QtCore/QDateTime:1, from database.h:11, from database.cpp:1: /usr/include/qt5/QtCore/qalgorithms.h: In function ‘constexpr uint qPopulationCount(quint32)’: /usr/include/qt5/QtCore/qalgorithms.h:532:32: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return __builtin_popcount(v); ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘constexpr uint qPopulationCount(quint8)’: /usr/include/qt5/QtCore/qalgorithms.h:545:32: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return __builtin_popcount(v); ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘constexpr uint qPopulationCount(quint16)’: /usr/include/qt5/QtCore/qalgorithms.h:555:32: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return __builtin_popcount(v); ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘constexpr uint qPopulationCount(quint64)’: /usr/include/qt5/QtCore/qalgorithms.h:566:34: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return __builtin_popcountll(v); ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountTrailingZeroBits(quint32)’: /usr/include/qt5/QtCore/qalgorithms.h:590:31: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_ctz(v) : 32U; ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountTrailingZeroBits(quint8)’: /usr/include/qt5/QtCore/qalgorithms.h:608:31: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_ctz(v) : 8U; ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountTrailingZeroBits(quint16)’: /usr/include/qt5/QtCore/qalgorithms.h:623:31: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_ctz(v) : 16U; ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountTrailingZeroBits(quint64)’: /usr/include/qt5/QtCore/qalgorithms.h:639:33: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_ctzll(v) : 64; ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountLeadingZeroBits(quint32)’: /usr/include/qt5/QtCore/qalgorithms.h:655:31: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_clz(v) : 32U; ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountLeadingZeroBits(quint8)’: /usr/include/qt5/QtCore/qalgorithms.h:670:31: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_clz(v)-24U : 8U; ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountLeadingZeroBits(quint16)’: /usr/include/qt5/QtCore/qalgorithms.h:682:31: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_clz(v)-16U : 16U; ^ /usr/include/qt5/QtCore/qalgorithms.h: In function ‘uint qCountLeadingZeroBits(quint64)’: /usr/include/qt5/QtCore/qalgorithms.h:695:33: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return v ? __builtin_clzll(v) : 64U; ^ In file included from /usr/include/qt5/QtCore/qdebug.h:40:0, from /usr/include/qt5/QtCore/qloggingcategory.h:38, from /usr/include/qt5/QtCore/QLoggingCategory:1, from database.cpp:3: /usr/include/qt5/QtCore/qmap.h: In member function ‘void QMapNodeBase::setColor(QMapNodeBase::Color)’: /usr/include/qt5/QtCore/qmap.h:95:65: error: negative integer implicitly converted to unsigned type [-Werror=sign-conversion] void setColor(Color c) { if (c == Black) p |= Black; else p &= ~Black; } ^ /usr/include/qt5/QtCore/qmap.h: In member function ‘QMapNodeBase* QMapNodeBase::parent() const’: /usr/include/qt5/QtCore/qmap.h:96:81: error: negative integer implicitly converted to unsigned type [-Werror=sign-conversion] QMapNodeBase *parent() const { return reinterpret_cast<QMapNodeBase *>(p & ~Mask); } ^ /usr/include/qt5/QtCore/qmap.h: At global scope: /usr/include/qt5/QtCore/qmap.h:108:8: error: ‘struct QMapNode<Key, T>’ only defines private constructors and has no friends [-Werror=ctor-dtor-privacy] struct QMapNode : public QMapNodeBase ^ In file included from /usr/include/qt5/QtCore/qobject.h:48:0, from /usr/include/qt5/QtCore/qiodevice.h:39, from /usr/include/qt5/QtCore/qtextstream.h:37, from /usr/include/qt5/QtCore/qdebug.h:42, from /usr/include/qt5/QtCore/qloggingcategory.h:38, from /usr/include/qt5/QtCore/QLoggingCategory:1, from database.cpp:3: /usr/include/qt5/QtCore/qmetatype.h: In member function ‘bool QMetaType::isExtended(QMetaType::ExtensionFlag) const’: /usr/include/qt5/QtCore/qmetatype.h:669:88: error: conversion to ‘uint {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] inline bool isExtended(const ExtensionFlag flag) const { return m_extensionFlags & flag; } ^ In file included from /usr/include/qt5/QtCore/qobject.h:48:0, from /usr/include/qt5/QtCore/qiodevice.h:39, from /usr/include/qt5/QtCore/qtextstream.h:37, from /usr/include/qt5/QtCore/qdebug.h:42, from /usr/include/qt5/QtCore/qloggingcategory.h:38, from /usr/include/qt5/QtCore/QLoggingCategory:1, from database.cpp:3: /usr/include/qt5/QtCore/qmetatype.h: In member function ‘int QMetaType::sizeOf() const’: /usr/include/qt5/QtCore/qmetatype.h:2170:29: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] return sizeExtended(); ^ /usr/include/qt5/QtCore/qmetatype.h:2171:12: error: conversion to ‘int’ from ‘uint {aka unsigned int}’ may change the sign of the result [-Werror=sign-conversion] return m_size; ^ In file included from /usr/include/qt5/QtCore/qobject.h:50:0, from /usr/include/qt5/QtCore/qiodevice.h:39, from /usr/include/qt5/QtCore/qtextstream.h:37, from /usr/include/qt5/QtCore/qdebug.h:42, from /usr/include/qt5/QtCore/qloggingcategory.h:38, from /usr/include/qt5/QtCore/QLoggingCategory:1, from database.cpp:3: /usr/include/qt5/QtCore/qobject_impl.h: At global scope: /usr/include/qt5/QtCore/qobject_impl.h:95:25: error: the mangled name of ‘static const int* QtPrivate::ConnectionTypes<QtPrivate::List<>, true>::types()’ will change in a future version of GCC [-Werror=abi] { static const int *types() { return Q_NULLPTR; } }; ^ In file included from /usr/include/qt5/QtCore/qloggingcategory.h:38:0, from /usr/include/qt5/QtCore/QLoggingCategory:1, from database.cpp:3: /usr/include/qt5/QtCore/qdebug.h: In member function ‘QDebug& QDebug::operator<<(char16_t)’: /usr/include/qt5/QtCore/qdebug.h:128:68: error: passing ‘char16_t’ chooses ‘int’ over ‘uint {aka unsigned int}’ [-Werror=sign-promo] inline QDebug &operator<<(char16_t t) { return *this << QChar(t); } ^ /usr/include/qt5/QtCore/qdebug.h:128:68: error: in call to ‘constexpr QChar::QChar(int)’ [-Werror=sign-promo] /usr/include/qt5/QtCore/qdebug.h: In member function ‘QDebug& QDebug::operator<<(QLatin1String)’: /usr/include/qt5/QtCore/qdebug.h:142:82: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] inline QDebug &operator<<(QLatin1String t) { putByteArray(t.latin1(), t.size(), ContainsLatin1); return maybeSpace(); } ^ /usr/include/qt5/QtCore/qdebug.h: In member function ‘QDebug& QDebug::operator<<(const QByteArray&)’: /usr/include/qt5/QtCore/qdebug.h:143:90: error: conversion to ‘size_t {aka unsigned int}’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] inline QDebug &operator<<(const QByteArray & t) { putByteArray(t.constData(), t.size(), ContainsBinary); return maybeSpace(); } ^
Compiler flags are:
QMAKE_CXXFLAGS += -Wall \ -pedantic \ -Wextra \ -Werror \ -Wno-unused \ -Wcast-align \ -Wcast-qual \ -Wctor-dtor-privacy \ -Wdisabled-optimization \ -Wformat=2 \ -Winit-self \ -Wlogical-op \ -Wmissing-declarations \ -Wmissing-include-dirs \ -Wnoexcept \ -Wold-style-cast \ -Woverloaded-virtual \ -Wredundant-decls \ -Wshadow \ -Wsign-conversion \ -Wsign-promo \ -Wstrict-null-sentinel \ -Wstrict-overflow=5 \ -Wswitch-default \ -Wundef \ -Wabi \ -Winline \ -Wzero-as-null-pointer-constant