summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-01-03 13:58:13 -0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-10 02:33:37 +0100
commitf4d3196e4f5d2f89f2d6564157402a78d454cca2 (patch)
treeda3c55e5ba39ffab18c932ae872941c8de77ef76
parentbbcdfb324b473373d37c005e2e005f0870cc74ce (diff)
downloadqtbase-f4d3196e4f5d2f89f2d6564157402a78d454cca2.tar.gz
qtbase-f4d3196e4f5d2f89f2d6564157402a78d454cca2.tar.bz2
qtbase-f4d3196e4f5d2f89f2d6564157402a78d454cca2.zip
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>
-rw-r--r--src/corelib/global/qglobal.h12
1 files changed, 6 insertions, 6 deletions
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 {