diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-12-14 14:45:43 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2020-12-17 14:33:56 +0100 |
commit | d75c5026e919a9a031f900456ffef7752a03fa27 (patch) | |
tree | 08e57c4583f096e516e0da30c4a398cf00433b9d /tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp | |
parent | 1ec4a7eddc9d521cb84fdf2fe19608f2d446bcb8 (diff) |
Clean-up warnings in corelib/thread tests
Fixed the following warnings:
- empty expression statement has no effect; remove unnecessary ';'
to silence this warning
- zero as null pointer constant
- no previous extern declaration for non-static variable
- use of old-style cast
- integer conversion warnings
Change-Id: Ieb31b127ce8e3b543aaf88a8e8fc463dcc8bc4e3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp')
-rw-r--r-- | tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp index 6859a55725..76974fc5fb 100644 --- a/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp +++ b/tests/auto/corelib/thread/qthreadonce/tst_qthreadonce.cpp @@ -112,7 +112,7 @@ void tst_QThreadOnce::sameThread() QCOMPARE(controlVariable, 1); static QSingleton<SingletonObject> s; - QTEST((int)s->val.loadRelaxed(), "expectedValue"); + QTEST(int(s->val.loadRelaxed()), "expectedValue"); s->val.ref(); QCOMPARE(SingletonObject::runCount, 1); @@ -145,7 +145,7 @@ void tst_QThreadOnce::multipleThreads() delete parent; QCOMPARE(controlVariable, 1); - QCOMPARE((int)IncrementThread::runCount.loadRelaxed(), NumberOfThreads); + QCOMPARE(int(IncrementThread::runCount.loadRelaxed()), NumberOfThreads); QCOMPARE(SingletonObject::runCount, 1); } |