Remove unused lambda capture
authorChih-Hung Hsieh <chh@google.com>
Mon, 15 May 2017 19:31:25 +0000 (12:31 -0700)
committerChih-Hung Hsieh <chh@google.com>
Mon, 15 May 2017 21:02:45 +0000 (14:02 -0700)
New clang compiler gives warning to unused lambda captures.
Apply clang-format.

Bug: 37423073
Test: Build

Change-Id: Icdf019df1a6c9dcadeb35551377d7afa09eebb3e

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 83a1db04c83f382170fced8f6e51e94fd5faa95e..65b5cfefb04032529308b5ac85fc254d96ea4ec9 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) {
@@ -1353,8 +1352,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 131e2e1b51b3a7771cc877201b22b94a70bfea87..4a5d25a59ef017850622917dc713c603d6a1a5fb 100644 (file)
@@ -134,7 +134,7 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
         omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
             gEnv->getInstance());
         ASSERT_NE(omx, nullptr);
-        observer = new CodecObserver([this](Message msg) { (void)msg; });
+        observer = new CodecObserver([](Message msg) { (void)msg; });
         ASSERT_NE(observer, nullptr);
         ASSERT_EQ(strncmp(gEnv->getComponent().c_str(), "OMX.", 4), 0)
             << "Invalid Component Name";
index 72893b88f031b25026a579b7a9b4959a7f67b36e..64296417678bb90163a7dff5922fae83862c298c 100644 (file)
@@ -134,7 +134,7 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
         omx = ::testing::VtsHalHidlTargetTestBase::getService<IOmx>(
             gEnv->getInstance());
         ASSERT_NE(omx, nullptr);
-        observer = new CodecObserver([this](Message msg) { (void)msg; });
+        observer = new CodecObserver([](Message msg) { (void)msg; });
         ASSERT_NE(observer, nullptr);
         ASSERT_EQ(strncmp(gEnv->getComponent().c_str(), "OMX.", 4), 0)
             << "Invalid Component Name";
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);
 }