From 92c2481fb9a12c7653bf74559a47c086495d5ea1 Mon Sep 17 00:00:00 2001 From: Gabriel Rauter Date: Tue, 4 Sep 2018 19:33:26 +0200 Subject: [PATCH] cmds: remove unused lambda capture this Remove a unused lambda capture on [this] in anbox::cmds::CheckFeatures::CheckFeatures() and promote -Wunused-lambda-capture back to error level on clang. --- CMakeLists.txt | 1 - src/anbox/cmds/check_features.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90144cc..bcde1a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,6 @@ set(EXTRA_CXX_WARNINGS "-Wnon-virtual-dtor -Wold-style-cast") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(EXTRA_CXX_WARNINGS "${EXTRA_CXX_WARNINGS} -Wno-error=unused-const-variable") - set(EXTRA_CXX_WARNINGS "${EXTRA_CXX_WARNINGS} -Wno-error=unused-lambda-capture") endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_AND_CXX_WARNINGS}") diff --git a/src/anbox/cmds/check_features.cpp b/src/anbox/cmds/check_features.cpp index 5826d59..dbb7dc5 100644 --- a/src/anbox/cmds/check_features.cpp +++ b/src/anbox/cmds/check_features.cpp @@ -42,7 +42,7 @@ anbox::cmds::CheckFeatures::CheckFeatures() cli::Name{"check-features"}, cli::Usage{"check-features"}, cli::Description{"Check that the host system supports all necessary features"}} { - action([this](const cli::Command::Context&) { + action([](const cli::Command::Context&) { #if defined(CPU_FEATURES_ARCH_X86) const auto info = cpu_features::GetX86Info(); std::vector missing_features;