diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-04-29 16:49:11 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-06-14 09:09:12 (GMT) |
commit | 4746bad937a4abfc413aa56f316fc25115fe0525 (patch) | |
tree | 5887375b097da01ff9658b151be97db01d70192c | |
parent | bb3bd601560132df769c32808ae0b36c56d1caab (diff) | |
download | Qt-4746bad937a4abfc413aa56f316fc25115fe0525.zip Qt-4746bad937a4abfc413aa56f316fc25115fe0525.tar.gz Qt-4746bad937a4abfc413aa56f316fc25115fe0525.tar.bz2 |
Silence the callgrind warnings in our source code when using gcc 4.6
-rw-r--r-- | src/testlib/qbenchmarkvalgrind.cpp | 11 |
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(); |