Fix function-not-used warnings detected by Clang 3.4

These functions have been turned to static (although inline), which
means they need to be used or marked as possibly unused.

qglobal.h:712:37: error: unused function 'qFuzzyCompare' [-Werror,-Wunused-function]

Change-Id: Ie2ee713d26c86e0574b579c1ea42b9404c3d2035
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Thiago Macieira 2014-01-03 13:58:13 -02:00 committed by The Qt Project
parent bbcdfb324b
commit f4d3196e4f
1 changed files with 6 additions and 6 deletions

View File

@ -706,13 +706,13 @@ typedef void (*QFunctionPointer)();
# define Q_UNIMPLEMENTED() qWarning("%s:%d: %s: Unimplemented code.", __FILE__, __LINE__, Q_FUNC_INFO)
#endif
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT;
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2)
{
return (qAbs(p1 - p2) * 1000000000000. <= qMin(qAbs(p1), qAbs(p2)));
}
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) Q_REQUIRED_RESULT;
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2)
{
return (qAbs(p1 - p2) * 100000.f <= qMin(qAbs(p1), qAbs(p2)));
@ -721,7 +721,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2)
/*!
\internal
*/
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) Q_REQUIRED_RESULT;
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d)
{
return qAbs(d) <= 0.000000000001;
@ -730,7 +730,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d)
/*!
\internal
*/
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) Q_REQUIRED_RESULT;
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED;
Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f)
{
return qAbs(f) <= 0.00001f;
@ -741,7 +741,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f)
check whether the actual value is 0 or close to 0, but whether
it is binary 0, disregarding sign.
*/
static inline bool qIsNull(double d) Q_REQUIRED_RESULT;
static inline bool qIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED;
static inline bool qIsNull(double d)
{
union U {
@ -758,7 +758,7 @@ static inline bool qIsNull(double d)
check whether the actual value is 0 or close to 0, but whether
it is binary 0, disregarding sign.
*/
static inline bool qIsNull(float f) Q_REQUIRED_RESULT;
static inline bool qIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED;
static inline bool qIsNull(float f)
{
union U {