OSDN Git Service

RootCanal: Silence unused using warnings
authorMyles Watson <mylesgw@google.com>
Tue, 23 Feb 2021 20:29:37 +0000 (12:29 -0800)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 24 Feb 2021 20:34:06 +0000 (20:34 +0000)
Tag: #feature
Test: cert/run LeIsoTest
Bug: 177907117
Change-Id: Ic0737634e3d5ebe3db102453eac792c890195d00

vendor_libs/test_vendor_lib/desktop/test_environment.cc
vendor_libs/test_vendor_lib/model/controller/acl_connection_handler.cc
vendor_libs/test_vendor_lib/model/devices/car_kit.cc
vendor_libs/test_vendor_lib/model/devices/car_kit.h
vendor_libs/test_vendor_lib/model/devices/device.cc
vendor_libs/test_vendor_lib/model/devices/hci_socket_device.h
vendor_libs/test_vendor_lib/model/setup/test_model.cc

index 1beb2fe..0a3d6b4 100644 (file)
@@ -30,7 +30,6 @@ namespace bluetooth {
 namespace root_canal {
 
 using test_vendor_lib::AsyncTaskId;
-using test_vendor_lib::DualModeController;
 using test_vendor_lib::TaskCallback;
 
 void TestEnvironment::initialize(std::promise<void> barrier) {
index e4612c4..20c5fea 100644 (file)
@@ -21,8 +21,6 @@
 #include "hci/address.h"
 #include "os/log.h"
 
-using std::shared_ptr;
-
 namespace test_vendor_lib {
 
 using ::bluetooth::hci::Address;
@@ -216,11 +214,11 @@ AclConnectionHandler::SetCigParameters(
     auto handle = GetUnusedHandle();
     StreamParameters a{.group_id = group_parameters.id,
                        .stream_id = streams[i].cis_id_,
-                       .max_sdu_s_to_m = streams[i].max_sdu_s_to_m_,
                        .max_sdu_m_to_s = streams[i].max_sdu_m_to_s_,
-                       .handle = handle,
+                       .max_sdu_s_to_m = streams[i].max_sdu_s_to_m_,
                        .rtn_m_to_s = streams[i].rtn_m_to_s_,
-                       .rtn_s_to_m = streams[i].rtn_s_to_m_};
+                       .rtn_s_to_m = streams[i].rtn_s_to_m_,
+                       .handle = handle};
     handles.push_back(handle);
     stream_parameters.push_back(std::move(a));
   }
index b368463..7a0be0d 100644 (file)
@@ -24,6 +24,8 @@ using std::vector;
 namespace test_vendor_lib {
 
 bool CarKit::registered_ = DeviceBoutique::Register("car_kit", &CarKit::Create);
+const std::string kCarKitPropertiesFile =
+    "/etc/bluetooth/car_kit_controller_properties.json";
 
 CarKit::CarKit() : Device(kCarKitPropertiesFile) {
   advertising_interval_ms_ = std::chrono::milliseconds(0);
index f59a2ad..32fd431 100644 (file)
 #include "hci/hci_packets.h"
 #include "model/controller/link_layer_controller.h"
 
-namespace {
-const std::string kCarKitPropertiesFile = "/etc/bluetooth/car_kit_controller_properties.json";
-}  // namespace
-
 namespace test_vendor_lib {
 
 class CarKit : public Device {
index 713a942..f733a84 100644 (file)
@@ -18,8 +18,6 @@
 
 #include "device.h"
 
-using std::vector;
-
 namespace test_vendor_lib {
 
 std::string Device::ToString() const {
index 9a1860f..285d312 100644 (file)
 #include "model/controller/dual_mode_controller.h"
 #include "model/devices/h4_packetizer.h"
 
-namespace {
-const std::string kHciSocketDevicePropertiesFile = "/etc/bluetooth/hci_socket_device_controller_properties.json";
-}  // namespace
-
 namespace test_vendor_lib {
 
 class HciSocketDevice : public DualModeController {
index 936cf0f..4ac37bd 100644 (file)
@@ -41,8 +41,6 @@
 #include "model/devices/hci_socket_device.h"
 #include "model/devices/link_layer_socket_device.h"
 
-using std::vector;
-
 namespace test_vendor_lib {
 
 TestModel::TestModel(