From f4d3196e4f5d2f89f2d6564157402a78d454cca2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 Jan 2014 13:58:13 -0200 Subject: 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 --- src/corelib/global/qglobal.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 6ec244dbee..9db48354b3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -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 { -- cgit v1.2.3