Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc0dfc67 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "RootCanal: Enable -Wall -Wextra -Werror on libbt-rootcanal"

parents 5eb3a054 b4d6482b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@ cc_library_static {
        ":BluetoothHciClassSources",
    ],
    cflags: [
        "-Wall",
        "-Wextra",
        "-Werror",
        "-fvisibility=hidden",
    ],
    local_include_dirs: [
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ extern "C" const char* __asan_default_options() {
}

bool crash_callback(const void* crash_context, size_t crash_context_size,
                    __attribute__((unused)) void* context) {
                    void* /* context */) {
  pid_t tid = BACKTRACE_CURRENT_THREAD;
  if (crash_context_size >=
      sizeof(google_breakpad::ExceptionHandler::CrashContext)) {
+3 −2
Original line number Diff line number Diff line
@@ -196,8 +196,9 @@ Phy::Type AclConnectionHandler::GetPhyType(uint16_t handle) const {
std::unique_ptr<bluetooth::hci::LeSetCigParametersCompleteBuilder>
AclConnectionHandler::SetCigParameters(
    uint8_t id, uint32_t sdu_interval_m_to_s, uint32_t sdu_interval_s_to_m,
    bluetooth::hci::ClockAccuracy accuracy, bluetooth::hci::Packing packing,
    bluetooth::hci::Enable framed, uint16_t max_transport_latency_m_to_s_,
    bluetooth::hci::ClockAccuracy /* accuracy */,
    bluetooth::hci::Packing packing, bluetooth::hci::Enable framed,
    uint16_t max_transport_latency_m_to_s_,
    uint16_t max_transport_latency_s_to_m_,
    std::vector<bluetooth::hci::CisParametersConfig>& streams) {
  std::vector<uint16_t> handles;
+25 −22
Original line number Diff line number Diff line
@@ -65,8 +65,7 @@ void LinkLayerController::SendLinkLayerPacket(
}

ErrorCode LinkLayerController::SendLeCommandToRemoteByAddress(
    OpCode opcode, bluetooth::packet::PacketView<true> args,
    const Address& remote, const Address& local) {
    OpCode opcode, const Address& remote, const Address& local) {
  switch (opcode) {
    case (OpCode::LE_READ_REMOTE_FEATURES):
      SendLinkLayerPacket(
@@ -133,7 +132,7 @@ ErrorCode LinkLayerController::SendCommandToRemoteByHandle(
  switch (opcode) {
    case (OpCode::LE_READ_REMOTE_FEATURES):
      return SendLeCommandToRemoteByAddress(
          opcode, args, connections_.GetAddress(handle).GetAddress(),
          opcode, connections_.GetAddress(handle).GetAddress(),
          connections_.GetOwnAddress(handle).GetAddress());
    default:
      return SendCommandToRemoteByAddress(
@@ -2797,7 +2796,7 @@ void LinkLayerController::LeSetPrivacyMode(uint8_t address_type, Address addr,
  LOG_INFO("mode = %d ", mode);
}

void LinkLayerController::LeReadIsoTxSync(uint16_t handle) {}
void LinkLayerController::LeReadIsoTxSync(uint16_t /* handle */) {}

void LinkLayerController::LeSetCigParameters(
    uint8_t cig_id, uint32_t sdu_interval_m_to_s, uint32_t sdu_interval_s_to_m,
@@ -2911,41 +2910,45 @@ ErrorCode LinkLayerController::LeRejectCisRequest(uint16_t cis_handle,
}

ErrorCode LinkLayerController::LeCreateBig(
    uint8_t big_handle, uint8_t advertising_handle, uint8_t num_bis,
    uint32_t sdu_interval, uint16_t max_sdu, uint16_t max_transport_latency,
    uint8_t rtn, bluetooth::hci::SecondaryPhyType phy,
    bluetooth::hci::Packing packing, bluetooth::hci::Enable framing,
    bluetooth::hci::Enable encryption, std::vector<uint16_t> broadcast_code) {
    uint8_t /* big_handle */, uint8_t /* advertising_handle */,
    uint8_t /* num_bis */, uint32_t /* sdu_interval */, uint16_t /* max_sdu */,
    uint16_t /* max_transport_latency */, uint8_t /* rtn */,
    bluetooth::hci::SecondaryPhyType /* phy */,
    bluetooth::hci::Packing /* packing */, bluetooth::hci::Enable /* framing */,
    bluetooth::hci::Enable /* encryption */,
    std::vector<uint16_t> /* broadcast_code */) {
  return ErrorCode::SUCCESS;
}

ErrorCode LinkLayerController::LeTerminateBig(uint8_t big_handle,
                                              ErrorCode reason) {
ErrorCode LinkLayerController::LeTerminateBig(uint8_t /* big_handle */,
                                              ErrorCode /* reason */) {
  return ErrorCode::SUCCESS;
}

ErrorCode LinkLayerController::LeBigCreateSync(
    uint8_t big_handle, uint16_t sync_handle, bluetooth::hci::Enable encryption,
    std::vector<uint16_t> broadcast_code, uint8_t mse,
    uint16_t big_sync_timeout, std::vector<uint8_t> bis) {
    uint8_t /* big_handle */, uint16_t /* sync_handle */,
    bluetooth::hci::Enable /* encryption */,
    std::vector<uint16_t> /* broadcast_code */, uint8_t /* mse */,
    uint16_t /* big_sync_timeout */, std::vector<uint8_t> /* bis */) {
  return ErrorCode::SUCCESS;
}

void LinkLayerController::LeBigTerminateSync(uint8_t big_handle) {}
void LinkLayerController::LeBigTerminateSync(uint8_t /* big_handle */) {}

ErrorCode LinkLayerController::LeRequestPeerSca(uint16_t request_handle) {
ErrorCode LinkLayerController::LeRequestPeerSca(uint16_t /* request_handle */) {
  return ErrorCode::SUCCESS;
}

void LinkLayerController::LeSetupIsoDataPath(
    uint16_t connection_handle,
    bluetooth::hci::DataPathDirection data_path_direction, uint8_t data_path_id,
    uint64_t codec_id, uint32_t controller_Delay,
    std::vector<uint8_t> codec_configuration) {}
    uint16_t /* connection_handle */,
    bluetooth::hci::DataPathDirection /* data_path_direction */,
    uint8_t /* data_path_id */, uint64_t /* codec_id */,
    uint32_t /* controller_Delay */,
    std::vector<uint8_t> /* codec_configuration */) {}

void LinkLayerController::LeRemoveIsoDataPath(
    uint16_t connection_handle,
    bluetooth::hci::DataPathDirection data_path_direction) {}
    uint16_t /* connection_handle */,
    bluetooth::hci::DataPathDirection /* data_path_direction */) {}

void LinkLayerController::HandleLeEnableEncryption(
    uint16_t handle, std::array<uint8_t, 8> rand, uint16_t ediv,
+2 −3
Original line number Diff line number Diff line
@@ -41,9 +41,8 @@ class LinkLayerController {
  ErrorCode SendCommandToRemoteByAddress(
      OpCode opcode, bluetooth::packet::PacketView<true> args,
      const Address& remote);
  ErrorCode SendLeCommandToRemoteByAddress(
      OpCode opcode, bluetooth::packet::PacketView<true> args,
      const Address& remote, const Address& local);
  ErrorCode SendLeCommandToRemoteByAddress(OpCode opcode, const Address& remote,
                                           const Address& local);
  ErrorCode SendCommandToRemoteByHandle(
      OpCode opcode, bluetooth::packet::PacketView<true> args, uint16_t handle);
  ErrorCode SendScoToRemote(bluetooth::hci::ScoView sco_packet);
Loading