From 315c2c468e504b83d616e2068bd4f7688ff58cf7 Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Fri, 15 Nov 2019 09:37:05 +0200 Subject: tst_QScopeGuard: Remove unused lambda capture qt5/qtbase/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp:100:38: warning: lambda capture 'caught' is not used [-Wunused-lambda-capture] auto cleanup = qScopeGuard([&caught] { s_globalState++; }); ~^~~~~~ Change-Id: I0d9b85896594f3ea35c8003846d4ac7ab5e33d16 Reviewed-by: Thiago Macieira --- tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/corelib/tools/qscopeguard') diff --git a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp index f95d48f042..01181ce20e 100644 --- a/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp +++ b/tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp @@ -67,7 +67,7 @@ void tst_QScopedGuard::exceptions() bool caught = false; QT_TRY { - auto cleanup = qScopeGuard([&caught] { s_globalState++; }); + auto cleanup = qScopeGuard([] { s_globalState++; }); QT_THROW(std::bad_alloc()); //if Qt compiled without exceptions this is noop s_globalState = 100; } -- cgit v1.2.3