summaryrefslogtreecommitdiffstats
path: root/src/testlib/qbenchmarkvalgrind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qbenchmarkvalgrind.cpp')
-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 4b260e8..22c7c37 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();