mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Fix Clang compiler warnings (-Wunused-lambda-capture)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
parent
e54fad7fa4
commit
cc929ed690
@ -310,7 +310,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compiler_flags(10 "-Wno-unneeded-member-function")
|
||||
add_compiler_flags(10 "-Wno-unreachable-code-return")
|
||||
add_compiler_flags(10 "-Wno-unsafe-buffer-usage")
|
||||
add_compiler_flags(10 "-Wno-unused-lambda-capture")
|
||||
add_compiler_flags(10 "-Wno-unused-member-function")
|
||||
add_compiler_flags(10 "-Wno-unused-parameter")
|
||||
add_compiler_flags(10 "-Wno-unused-template")
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
{}
|
||||
|
||||
Action act() override {
|
||||
return m_cv->waitFor(m_lockGuard, [this]{return false;}, std::chrono::seconds(1))
|
||||
return m_cv->waitFor(m_lockGuard, []{return false;}, std::chrono::seconds(1))
|
||||
.next(yieldTo(&TestCoroutineTimeout::onReady));
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ void runServer(v_uint16 port, v_int32 delaySeconds, v_int32 iterations, bool sta
|
||||
|
||||
runner.addController(controller);
|
||||
|
||||
runner.run([&runner, delaySeconds, iterations, stable, controller] {
|
||||
runner.run([delaySeconds, iterations, stable, controller] {
|
||||
|
||||
for(v_int32 i = 0; i < iterations; i ++) {
|
||||
std::this_thread::sleep_for(std::chrono::seconds(delaySeconds));
|
||||
|
@ -264,7 +264,7 @@ void FullAsyncClientTest::onRun() {
|
||||
|
||||
runner.addController(app::ControllerAsync::createShared());
|
||||
|
||||
runner.run([this, &runner] {
|
||||
runner.run([this] {
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::async::Executor>, executor);
|
||||
|
||||
|
@ -147,7 +147,7 @@ void FullAsyncTest::onRun() {
|
||||
runner.addController(app::ControllerAsync::createShared());
|
||||
runner.addController(app::ControllerWithInterceptorsAsync::createShared());
|
||||
|
||||
runner.run([this, &runner] {
|
||||
runner.run([this] {
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ClientConnectionProvider>, clientConnectionProvider);
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::data::mapping::ObjectMapper>, objectMapper);
|
||||
|
@ -149,7 +149,7 @@ void FullTest::onRun() {
|
||||
runner.addController(app::BasicAuthorizationController::createShared());
|
||||
runner.addController(app::BearerAuthorizationController::createShared());
|
||||
|
||||
runner.run([this, &runner] {
|
||||
runner.run([this] {
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ClientConnectionProvider>, clientConnectionProvider);
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::data::mapping::ObjectMapper>, objectMapper);
|
||||
|
@ -134,7 +134,7 @@ void PipelineAsyncTest::onRun() {
|
||||
|
||||
runner.addController(app::ControllerAsync::createShared());
|
||||
|
||||
runner.run([this, &runner] {
|
||||
runner.run([this] {
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ClientConnectionProvider>, clientConnectionProvider);
|
||||
|
||||
|
@ -129,7 +129,7 @@ void PipelineTest::onRun() {
|
||||
|
||||
runner.addController(app::Controller::createShared());
|
||||
|
||||
runner.run([this, &runner] {
|
||||
runner.run([this] {
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ClientConnectionProvider>, clientConnectionProvider);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user