Fix ICC warnings about functions declared but not used
Added Q_DECL_UNUSED for the function used in Q_ASSERT; removed the functions that really weren't used and added the #ifdef for the function that was only used under #ifdef. qmetaobjectbuilder.cpp(93): warning #177: function "priv" was declared but never referenced qobject.cpp(2349): warning #177: function "check_and_warn_compat" was declared but never referenced qpathsimplifier.cpp(141): error #177: function "<unnamed>::Rational::isValid" was declared but never referenced qtextengine.cpp(2584): error #177: function "<unnamed>::QScriptItemComparator::operator()(const QScriptItem &, const QScriptItem &)" was declared but never referenced Change-Id: I89a140d59211f10ecd88d751f0bcc0ea2fedff7f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
f62b05ccf1
commit
7ac6ce2133
@ -90,7 +90,7 @@ Q_CORE_EXPORT bool isBuiltinType(const QByteArray &type)
|
||||
} // namespace QtPrivate
|
||||
|
||||
// copied from qmetaobject.cpp
|
||||
static inline const QMetaObjectPrivate *priv(const uint* data)
|
||||
static inline Q_DECL_UNUSED const QMetaObjectPrivate *priv(const uint* data)
|
||||
{ return reinterpret_cast<const QMetaObjectPrivate*>(data); }
|
||||
|
||||
class QMetaMethodBuilderPrivate
|
||||
|
@ -2346,6 +2346,7 @@ void QMetaObjectPrivate::memberIndexes(const QObject *obj,
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaMethod &signal,
|
||||
const QMetaObject *receiver, const QMetaMethod &method)
|
||||
{
|
||||
@ -2360,6 +2361,7 @@ static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaM
|
||||
receiver->className(), method.methodSignature().constData());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\threadsafe
|
||||
|
@ -138,7 +138,6 @@ Fraction fraction(unsigned int n, unsigned int d) {
|
||||
|
||||
struct Rational
|
||||
{
|
||||
bool isValid() const { return fraction.isValid(); }
|
||||
int integer;
|
||||
Fraction fraction;
|
||||
};
|
||||
|
@ -2581,7 +2581,6 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int
|
||||
|
||||
namespace {
|
||||
struct QScriptItemComparator {
|
||||
bool operator()(const QScriptItem &a, const QScriptItem &b) { return a.position < b.position; }
|
||||
bool operator()(int p, const QScriptItem &b) { return p < b.position; }
|
||||
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
|
||||
//The STL implementation of MSVC 2008 requires the definition
|
||||
|
Loading…
Reference in New Issue
Block a user