Remove unused lambda capture
authorChih-Hung Hsieh <chh@google.com>
Mon, 15 May 2017 19:31:25 +0000 (12:31 -0700)
committerYi Kong <yikong@google.com>
Wed, 7 Jun 2017 19:57:20 +0000 (12:57 -0700)
New clang compiler gives warning to unused lambda captures.
Apply clang-format.

Bug: 37423073
Test: Build

Change-Id: Icdf019df1a6c9dcadeb35551377d7afa09eebb3e
(cherry picked from commit 7eb57b60ab1825afbec3da3786678f548dc58e32)

audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp
media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp
sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp

index 8ac8a297e681ea7c4d81185c84ae8cda9cb61698..90fec018ef21a772789f36ae7851ec7bb5f007d6 100644 (file)
@@ -557,8 +557,7 @@ static void testDebugDump(DebugDump debugDump) {
 
 TEST_F(AudioPrimaryHidlTest, DebugDump) {
     doc::test("Check that the hal can dump its state without error");
-    testDebugDump(
-        [this](const auto& handle) { return device->debugDump(handle); });
+    testDebugDump([](const auto& handle) { return device->debugDump(handle); });
 }
 
 TEST_F(AudioPrimaryHidlTest, DebugDumpInvalidArguments) {
@@ -1341,8 +1340,7 @@ TEST_P(OutputStreamTest, GetPresentationPositionStop) {
 
 TEST_F(AudioPrimaryHidlTest, setVoiceVolume) {
     doc::test("Make sure setVoiceVolume only succeed if volume is in [0,1]");
-    testUnitaryGain(
-        [this](float volume) { return device->setVoiceVolume(volume); });
+    testUnitaryGain([](float volume) { return device->setVoiceVolume(volume); });
 }
 
 TEST_F(AudioPrimaryHidlTest, setMode) {
index c8e44d3d49a2ac345b0cb247f0cc5c5a7dde567f..7a29d425d445d9e114ca7891d9e864bc1d428803 100644 (file)
@@ -2217,11 +2217,11 @@ TEST_F(CameraHidlTest, configureStreamsZSLInputOutputs) {
                             inputStream, zslStream, outputStream};
                     StreamConfiguration config = {streams,
                             StreamConfigurationMode::NORMAL_MODE};
-                    ret = session->configureStreams(config, [streamId] (Status s,
-                            HalStreamConfiguration halConfig) {
-                        ASSERT_EQ(Status::OK, s);
-                        ASSERT_EQ(3u, halConfig.streams.size());
-                    });
+                    ret = session->configureStreams(config,
+                                                    [](Status s, HalStreamConfiguration halConfig) {
+                                                        ASSERT_EQ(Status::OK, s);
+                                                        ASSERT_EQ(3u, halConfig.streams.size());
+                                                    });
                     ASSERT_TRUE(ret.isOk());
                 }
             }
@@ -2280,11 +2280,11 @@ TEST_F(CameraHidlTest, configureStreamsPreviewStillOutputs) {
                             previewStream, blobStream};
                     StreamConfiguration config = {streams,
                             StreamConfigurationMode::NORMAL_MODE};
-                    ret = session->configureStreams(config, [streamId] (Status s,
-                            HalStreamConfiguration halConfig) {
-                        ASSERT_EQ(Status::OK, s);
-                        ASSERT_EQ(2u, halConfig.streams.size());
-                    });
+                    ret = session->configureStreams(config,
+                                                    [](Status s, HalStreamConfiguration halConfig) {
+                                                        ASSERT_EQ(Status::OK, s);
+                                                        ASSERT_EQ(2u, halConfig.streams.size());
+                                                    });
                     ASSERT_TRUE(ret.isOk());
                 }
             }
@@ -2348,8 +2348,7 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
             streams[0] = stream;
             config = {streams,
                     StreamConfigurationMode::CONSTRAINED_HIGH_SPEED_MODE};
-            ret = session->configureStreams(config, [streamId] (Status s,
-                    HalStreamConfiguration) {
+            ret = session->configureStreams(config, [](Status s, HalStreamConfiguration) {
                 ASSERT_TRUE((Status::ILLEGAL_ARGUMENT == s) ||
                             (Status::INTERNAL_ERROR == s));
             });
@@ -2363,8 +2362,7 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
             streams[0] = stream;
             config = {streams,
                     StreamConfigurationMode::CONSTRAINED_HIGH_SPEED_MODE};
-            ret = session->configureStreams(config, [streamId] (Status s,
-                    HalStreamConfiguration) {
+            ret = session->configureStreams(config, [](Status s, HalStreamConfiguration) {
                 ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
             });
             ASSERT_TRUE(ret.isOk());
@@ -2377,8 +2375,7 @@ TEST_F(CameraHidlTest, configureStreamsConstrainedOutputs) {
             streams[0] = stream;
             config = {streams,
                     StreamConfigurationMode::CONSTRAINED_HIGH_SPEED_MODE};
-            ret = session->configureStreams(config, [streamId] (Status s,
-                    HalStreamConfiguration) {
+            ret = session->configureStreams(config, [](Status s, HalStreamConfiguration) {
                 ASSERT_EQ(Status::ILLEGAL_ARGUMENT, s);
             });
             ASSERT_TRUE(ret.isOk());
@@ -2438,11 +2435,11 @@ TEST_F(CameraHidlTest, configureStreamsVideoStillOutputs) {
                             videoStream, blobStream};
                     StreamConfiguration config = {streams,
                             StreamConfigurationMode::NORMAL_MODE};
-                    ret = session->configureStreams(config, [streamId] (Status s,
-                            HalStreamConfiguration halConfig) {
-                        ASSERT_EQ(Status::OK, s);
-                        ASSERT_EQ(2u, halConfig.streams.size());
-                    });
+                    ret = session->configureStreams(config,
+                                                    [](Status s, HalStreamConfiguration halConfig) {
+                                                        ASSERT_EQ(Status::OK, s);
+                                                        ASSERT_EQ(2u, halConfig.streams.size());
+                                                    });
                     ASSERT_TRUE(ret.isOk());
                 }
             }
index ecd9ef98aaaf8771dd06f32247b29eedb4d70c69..8216955e9a985b0e51a58ac0a7e602fda2919381 100644 (file)
@@ -137,7 +137,7 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
             gEnv->getInstance());
         ASSERT_NE(omx, nullptr);
         observer =
-            new CodecObserver([this](Message msg, const BufferInfo* buffer) {
+            new CodecObserver([](Message msg, const BufferInfo* buffer) {
                 handleMessage(msg, buffer);
             });
         ASSERT_NE(observer, nullptr);
index 7a5743077049d2e5b2ef4175abf88d5d4cce0700..515a7cd927c962303c097b40e9780306c5f37381 100644 (file)
@@ -155,7 +155,7 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
             gEnv->getInstance());
         ASSERT_NE(omx, nullptr);
         observer =
-            new CodecObserver([this](Message msg, const BufferInfo* buffer) {
+            new CodecObserver([](Message msg, const BufferInfo* buffer) {
                 handleMessage(msg, buffer);
             });
         ASSERT_NE(observer, nullptr);
index 06a9d7e8291b69fce0c83a20426e798e2ea6f79d..c92603b6af970400bea4fdcf69f2648fee0468f4 100644 (file)
@@ -1319,9 +1319,7 @@ void SensorsHidlTest::testDirectReportOperation(
 
   // stop sensor and unregister channel
   configDirectReport(sensor.sensorHandle, channelHandle, RateLevel::STOP,
-        [&eventToken] (auto result, auto) {
-            EXPECT_EQ(result, Result::OK);
-        });
+                     [](auto result, auto) { EXPECT_EQ(result, Result::OK); });
   EXPECT_EQ(unregisterDirectChannel(channelHandle), Result::OK);
 }