diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-17 15:52:53 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-21 09:58:23 +0100 |
commit | e8b4c49efddb87f4195c74668b5026119eccea56 (patch) | |
tree | 973f4539844b7ff0797bf7b7b1383c853dffda99 /tests/auto/corelib/concurrent | |
parent | ed5583048ecf3d340ded7e4d5f1b926a9929eebd (diff) |
qtbase tests: Fix some warnings
- Fix warnings about QAtomicPointer/Int usage
- Fix some gcc 4.6 warnings about assigned/unused variables
Change-Id: Ib4dbf9110f0dad93ad48e97278310f05fad3a82a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/concurrent')
4 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp index 964b834fa7..b959dcb6f9 100644 --- a/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/concurrent/qfuture/tst_qfuture.cpp @@ -95,7 +95,6 @@ void tst_QFuture::resultStore() { ResultStore<int> store; - ResultIteratorBase it = store.begin(); QVERIFY(store.begin() == store.end()); QVERIFY(store.resultAt(0) == store.end()); QVERIFY(store.resultAt(1) == store.end()); diff --git a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp index ed714101e7..96ba71b156 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentiteratekernel/tst_qtconcurrentiteratekernel.cpp @@ -233,7 +233,8 @@ public: bool shouldThrottleThread() { - return (iterations > 100 && iterations < 200); + const int load = iterations.load(); + return (load > 100 && load < 200); } bool throttling; }; diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp index 1c60621763..a1dd1c7ab9 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp @@ -1285,6 +1285,7 @@ void tst_QtConcurrentMap::mappedReduced() // test Q_DECLARE_OPERATORS_FOR_FLAGS QtConcurrent::ReduceOptions opt = (QtConcurrent::UnorderedReduce | QtConcurrent::SequentialReduce); + QVERIFY(opt); // functor-functor { diff --git a/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp b/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp index 1728be68fe..f5b3f2965e 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentresultstore/tst_qtconcurrentresultstore.cpp @@ -88,7 +88,6 @@ void tst_QtConcurrentResultStore::iterators() { { ResultStore<int> store; - ResultIteratorBase it = store.begin(); QVERIFY(store.begin() == store.end()); QVERIFY(store.resultAt(0) == store.end()); QVERIFY(store.resultAt(1) == store.end()); |