summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-04-29 18:49:11 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2011-06-14 11:09:12 +0200
commit4746bad937a4abfc413aa56f316fc25115fe0525 (patch)
tree5887375b097da01ff9658b151be97db01d70192c /src/testlib
parentbb3bd601560132df769c32808ae0b36c56d1caab (diff)
Silence the callgrind warnings in our source code when using gcc 4.6
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qbenchmarkvalgrind.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp
index 4b260e8597..22c7c3774c 100644
--- a/src/testlib/qbenchmarkvalgrind.cpp
+++ b/src/testlib/qbenchmarkvalgrind.cpp
@@ -225,6 +225,12 @@ bool QBenchmarkValgrindUtils::runCallgrindSubProcess(const QStringList &origAppA
return finishedOk;
}
+#if defined(Q_CC_GNU) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+// the callgrind macros below generate warnings
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#endif
+
void QBenchmarkCallgrindMeasurer::start()
{
CALLGRIND_ZERO_STATS;
@@ -237,6 +243,11 @@ qint64 QBenchmarkCallgrindMeasurer::checkpoint()
return result;
}
+#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406)
+// the callgrind macros above generate warnings
+# pragma GCC diagnostic pop
+#endif
+
qint64 QBenchmarkCallgrindMeasurer::stop()
{
return checkpoint();