diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-06-12 14:41:01 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-06-12 18:22:38 +0000 |
| commit | 668d81f73a5c2f4ec14764d1892f2eaf6494c0f1 (patch) | |
| tree | 98f3cf5d7fe66d9f518953055498d639c445e953 /src/testlib/qtestcrashhandler_unix.cpp | |
| parent | 901a6e7986c1f6323eae8550f7085e4ba1513f20 (diff) | |
tst_QPointer: fix Clang 19 -Wunused-lambda-capture
Clang informs that ITERATIONS_PER_THREAD need not be captured:
tst_qpointer.cpp:548:66: warning: lambda capture 'ITERATIONS_PER_THREAD' is not required to be captured for this use [-Wunused-lambda-capture]
548 | QThread::create([&startSemaphore, &targetObject, ITERATIONS_PER_THREAD]() {
| ~~^~~~~~~~~~~~~~~~~~~~~
Make ITERATIONS_PER_THREAD (and NUM_THREADS, while at it) constexpr,
indicating even to non-language-lawyers that these variables, indeed,
need not be captured, then drop the capture.
Amends 253f34082f526ff1ffd9eaefac73cc9aa616ab2a.
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I27d94763058e1dcea3a65d4ff2c859b40336446f
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/testlib/qtestcrashhandler_unix.cpp')
0 files changed, 0 insertions, 0 deletions
