Merge "[system][bt][gd] fix -Wreorder-init-list"
diff --git a/gd/l2cap/classic/fixed_channel_manager.cc b/gd/l2cap/classic/fixed_channel_manager.cc
index 3334804..0c3e5c7 100644
--- a/gd/l2cap/classic/fixed_channel_manager.cc
+++ b/gd/l2cap/classic/fixed_channel_manager.cc
@@ -26,7 +26,9 @@
 bool FixedChannelManager::ConnectServices(hci::Address device, OnConnectionFailureCallback on_fail_callback,
                                           os::Handler* handler) {
   internal::LinkManager::PendingFixedChannelConnection pending_fixed_channel_connection{
-      .on_fail_callback_ = std::move(on_fail_callback), .handler_ = handler};
+      .handler_ = handler,
+      .on_fail_callback_ = std::move(on_fail_callback),
+  };
   l2cap_layer_handler_->Post(common::BindOnce(&internal::LinkManager::ConnectFixedChannelServices,
                                               common::Unretained(link_manager_), device,
                                               std::move(pending_fixed_channel_connection)));
diff --git a/gd/l2cap/le/fixed_channel_manager.cc b/gd/l2cap/le/fixed_channel_manager.cc
index 44768d1..7b3c6c1 100644
--- a/gd/l2cap/le/fixed_channel_manager.cc
+++ b/gd/l2cap/le/fixed_channel_manager.cc
@@ -26,7 +26,9 @@
 bool FixedChannelManager::ConnectServices(hci::Address device, hci::AddressType address_type,
                                           OnConnectionFailureCallback on_fail_callback, os::Handler* handler) {
   internal::LinkManager::PendingFixedChannelConnection pending_fixed_channel_connection{
-      .on_fail_callback_ = std::move(on_fail_callback), .handler_ = handler};
+      .handler_ = handler,
+      .on_fail_callback_ = std::move(on_fail_callback),
+  };
   l2cap_layer_handler_->Post(common::BindOnce(&internal::LinkManager::ConnectFixedChannelServices,
                                               common::Unretained(link_manager_), device, address_type,
                                               std::move(pending_fixed_channel_connection)));
diff --git a/gd/smp/ecc/p_256_ecc_pp.h b/gd/smp/ecc/p_256_ecc_pp.h
index 4fc4653..d46b6b3 100644
--- a/gd/smp/ecc/p_256_ecc_pp.h
+++ b/gd/smp/ecc/p_256_ecc_pp.h
@@ -54,10 +54,10 @@
 
 // P-256 elliptic curve, as per BT Spec 5.1 Vol 2, Part H 7.6
 static constexpr elliptic_curve_t curve_p256{
-    .p = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0, 0x0, 0x0, 0x00000001, 0xFFFFFFFF},
-    .omega = {0},
     .a = {0},
     .b = {0x27d2604b, 0x3bce3c3e, 0xcc53b0f6, 0x651d06b0, 0x769886bc, 0xb3ebbd55, 0xaa3a93e7, 0x5ac635d8},
+    .p = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0, 0x0, 0x0, 0x00000001, 0xFFFFFFFF},
+    .omega = {0},
 
     .G = {.x = {0xd898c296, 0xf4a13945, 0x2deb33a0, 0x77037d81, 0x63a440f2, 0xf8bce6e5, 0xe12c4247, 0x6b17d1f2},
           .y = {0x37bf51f5, 0xcbb64068, 0x6b315ece, 0x2bce3357, 0x7c0f9e16, 0x8ee7eb4a, 0xfe1a7f9b, 0x4fe342e2}},
@@ -72,4 +72,4 @@
 
 }  // namespace ecc
 }  // namespace smp
-}  // namespace bluetooth
\ No newline at end of file
+}  // namespace bluetooth
diff --git a/gd/smp/pairing_handler_le_unittest.cc b/gd/smp/pairing_handler_le_unittest.cc
index c62dd57..eca5955 100644
--- a/gd/smp/pairing_handler_le_unittest.cc
+++ b/gd/smp/pairing_handler_le_unittest.cc
@@ -130,12 +130,11 @@
                               .initiator_key_distribution = 0x03,
                               .responder_key_distribution = 0x03},
 
-    .le_security_interface = &leSecurityMock,
-    .ui_handler = &uiMock,
-
     .remotely_initiated = false,
     .remote_connection_address = {},
     .remote_connection_address_type = 0x01,
+    .ui_handler = &uiMock,
+    .le_security_interface = &leSecurityMock,
     .OnPairingFinished = OnPairingFinished,
 };
 
@@ -263,10 +262,9 @@
                               .initiator_key_distribution = 0x03,
                               .responder_key_distribution = 0x03},
 
-    .le_security_interface = &leSecurityMock,
-    .ui_handler = &uiMock,
-
     .remotely_initiated = true,
+    .ui_handler = &uiMock,
+    .le_security_interface = &leSecurityMock,
     .OnPairingFinished = OnPairingFinished,
 };
 
@@ -299,13 +297,12 @@
                               .initiator_key_distribution = 0x03,
                               .responder_key_distribution = 0x03},
 
-    .le_security_interface = &leSecurityMock,
-    .ui_handler = &uiMock,
-
     .remotely_initiated = true,
     .pairing_request = PairingRequestView::Create(BuilderToView(
         PairingRequestBuilder::Create(IoCapability::NO_INPUT_NO_OUTPUT, OobDataFlag::NOT_PRESENT,
                                       AuthReqMaskBondingFlag | AuthReqMaskMitm | AuthReqMaskSc, 16, 0x03, 0x03))),
+    .ui_handler = &uiMock,
+    .le_security_interface = &leSecurityMock,
 
     .OnPairingFinished = OnPairingFinished,
 };
@@ -331,4 +328,4 @@
 }
 
 }  // namespace smp
-}  // namespace bluetooth
\ No newline at end of file
+}  // namespace bluetooth
diff --git a/gd/smp/test/pairing_handler_le_pair_test.cc b/gd/smp/test/pairing_handler_le_pair_test.cc
index 92f5d47..3d1b4ca 100644
--- a/gd/smp/test/pairing_handler_le_pair_test.cc
+++ b/gd/smp/test/pairing_handler_le_pair_test.cc
@@ -174,15 +174,14 @@
                                   .initiator_key_distribution = KeyMaskId | KeyMaskSign,
                                   .responder_key_distribution = KeyMaskId | KeyMaskSign},
 
+        .remotely_initiated = false,
+        .connection_handle = CONN_HANDLE_MASTER,
+        .remote_connection_address = ADDRESS_SLAVE,
+        .remote_connection_address_type = ADDRESS_TYPE_SLAVE,
         .ui_handler = &master_ui_handler,
         .le_security_interface = &master_le_security_mock,
         .proper_l2cap_interface = up_buffer_a_.get(),
         .l2cap_handler = handler_,
-
-        .connection_handle = CONN_HANDLE_MASTER,
-        .remotely_initiated = false,
-        .remote_connection_address = ADDRESS_SLAVE,
-        .remote_connection_address_type = ADDRESS_TYPE_SLAVE,
         .OnPairingFinished = OnPairingFinishedMaster,
     };
 
@@ -197,16 +196,14 @@
                                   .maximum_encryption_key_size = 16,
                                   .initiator_key_distribution = KeyMaskId | KeyMaskSign,
                                   .responder_key_distribution = KeyMaskId | KeyMaskSign},
-
+        .remotely_initiated = true,
+        .connection_handle = CONN_HANDLE_SLAVE,
+        .remote_connection_address = ADDRESS_MASTER,
+        .remote_connection_address_type = ADDRESS_TYPE_MASTER,
         .ui_handler = &slave_ui_handler,
         .le_security_interface = &slave_le_security_mock,
         .proper_l2cap_interface = up_buffer_b_.get(),
         .l2cap_handler = handler_,
-
-        .connection_handle = CONN_HANDLE_SLAVE,
-        .remotely_initiated = true,
-        .remote_connection_address = ADDRESS_MASTER,
-        .remote_connection_address_type = ADDRESS_TYPE_MASTER,
         .OnPairingFinished = OnPairingFinishedSlave,
     };
 
@@ -342,29 +339,25 @@
       .my_role = hci::Role::MASTER,
       .my_connection_address = ADDRESS_MASTER,
       .my_connection_address_type = ADDRESS_TYPE_MASTER,
-
       .myPairingCapabilities = {.io_capability = IoCapability::NO_INPUT_NO_OUTPUT,
                                 .oob_data_flag = OobDataFlag::NOT_PRESENT,
                                 .auth_req = AuthReqMaskBondingFlag | AuthReqMaskMitm | AuthReqMaskSc,
                                 .maximum_encryption_key_size = 16,
                                 .initiator_key_distribution = KeyMaskId | KeyMaskSign,
                                 .responder_key_distribution = KeyMaskId | KeyMaskSign},
-
+      .remotely_initiated = true,
+      .connection_handle = CONN_HANDLE_MASTER,
+      .remote_connection_address = ADDRESS_SLAVE,
+      .remote_connection_address_type = ADDRESS_TYPE_SLAVE,
       .ui_handler = &master_ui_handler,
       .le_security_interface = &master_le_security_mock,
       .proper_l2cap_interface = up_buffer_a_.get(),
       .l2cap_handler = handler_,
-
-      .connection_handle = CONN_HANDLE_MASTER,
-      .remotely_initiated = true,
-      .remote_connection_address = ADDRESS_SLAVE,
-      .remote_connection_address_type = ADDRESS_TYPE_SLAVE,
       .OnPairingFinished = OnPairingFinishedMaster,
   };
 
   slave_setup = {
       .my_role = hci::Role::SLAVE,
-
       .my_connection_address = ADDRESS_SLAVE,
       .my_connection_address_type = ADDRESS_TYPE_SLAVE,
       .myPairingCapabilities = {.io_capability = IoCapability::NO_INPUT_NO_OUTPUT,
@@ -373,16 +366,14 @@
                                 .maximum_encryption_key_size = 16,
                                 .initiator_key_distribution = KeyMaskId | KeyMaskSign,
                                 .responder_key_distribution = KeyMaskId | KeyMaskSign},
-
+      .remotely_initiated = false,
+      .connection_handle = CONN_HANDLE_SLAVE,
+      .remote_connection_address = ADDRESS_MASTER,
+      .remote_connection_address_type = ADDRESS_TYPE_MASTER,
       .ui_handler = &slave_ui_handler,
       .le_security_interface = &slave_le_security_mock,
       .proper_l2cap_interface = up_buffer_b_.get(),
       .l2cap_handler = handler_,
-
-      .connection_handle = CONN_HANDLE_SLAVE,
-      .remotely_initiated = false,
-      .remote_connection_address = ADDRESS_MASTER,
-      .remote_connection_address_type = ADDRESS_TYPE_MASTER,
       .OnPairingFinished = OnPairingFinishedSlave,
   };
 
@@ -650,4 +641,4 @@
 }
 
 }  // namespace smp
-}  // namespace bluetooth
\ No newline at end of file
+}  // namespace bluetooth