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

Commit 68290871 authored by Henri Chataing's avatar Henri Chataing
Browse files

system/profile/avrcp/Android.bp: Enforce -Wunused-parameter

Bug: 299772495
Test: m com.android.btservices
Flag: EXEMPT, mechanical refactor
Change-Id: I4a9c08d8dd56989b8ace17bd437e7c4df326fb21
parent 8b5c129c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ public:
  }

private:
  void wholeEntry(size_t f, AttributeEntry&& entry) {
  void wholeEntry(size_t /*f*/, AttributeEntry&& entry) {
    _control_set.insert(entry);
    _order_control.push_back(entry);
    if (_builder->size() != expected_size()) {
+0 −6
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ cc_library_static {
    ],
    min_sdk_version: "Tiramisu",
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -91,10 +90,6 @@ cc_test {
    sanitize: {
        cfi: false,
    },

    cflags: [
        "-Wno-unused-parameter",
    ],
    header_libs: ["libbluetooth_headers"],
}

@@ -143,5 +138,4 @@ cc_fuzz {
            enabled: false,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}
+3 −3
Original line number Diff line number Diff line
@@ -178,8 +178,8 @@ uint16_t ControlAvrcSdpRecordHelper::UpdateRecord(const uint16_t new_categories)
  return result ? AVRC_SUCCESS : AVRC_FAIL;
}

uint16_t ControlAvrcSdpRecordHelper::EnableCovertArt(uint16_t cover_art_psm,
                                                     const uint16_t request_id) {
uint16_t ControlAvrcSdpRecordHelper::EnableCovertArt(uint16_t /*cover_art_psm*/,
                                                     const uint16_t /*request_id*/) {
  log::warn(
          "Enabling cover art support dynamically is not supported for service "
          "UUID {:x}",
@@ -187,7 +187,7 @@ uint16_t ControlAvrcSdpRecordHelper::EnableCovertArt(uint16_t cover_art_psm,
  return AVRC_FAIL;
}

uint16_t ControlAvrcSdpRecordHelper::DisableCovertArt(const uint16_t request_id) {
uint16_t ControlAvrcSdpRecordHelper::DisableCovertArt(const uint16_t /*request_id*/) {
  log::warn(
          "Disabling cover art support dynamically is not supported for service "
          "UUID {:x}",
+6 −5
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ bool ConnectionHandler::ConnectDevice(const RawAddress& bdaddr) {
  }

  auto connection_lambda = [](ConnectionHandler* instance_, const RawAddress& bdaddr,
                              tSDP_STATUS status, uint16_t version, uint16_t features) {
                              tSDP_STATUS status, uint16_t /*version*/, uint16_t features) {
    log::info("SDP Completed features=0x{:x}", features);
    if (status != tSDP_STATUS::SDP_SUCCESS || !(features & BTA_AV_FEAT_RCCT)) {
      log::error(
@@ -371,8 +371,8 @@ void ConnectionHandler::AcceptorControlCb(uint8_t handle, uint8_t event, uint16_
      connection_cb_.Run(newDevice);

      log::info("Performing SDP on connected device. address={}", *peer_addr);
      auto sdp_lambda = [](ConnectionHandler* instance_, uint8_t handle, tSDP_STATUS status,
                           uint16_t version, uint16_t features) {
      auto sdp_lambda = [](ConnectionHandler* instance_, uint8_t handle, tSDP_STATUS /*status*/,
                           uint16_t /*version*/, uint16_t features) {
        if (instance_->device_map_.find(handle) == instance_->device_map_.end()) {
          log::warn("No device found for handle: 0x{:x}", handle);
          return;
@@ -652,8 +652,9 @@ bool ConnectionHandler::SdpLookupAudioRole(uint16_t handle) {
                                              weak_ptr_factory_.GetWeakPtr(), handle));
}

void ConnectionHandler::SdpLookupAudioRoleCb(uint16_t handle, bool found, tA2DP_Service* p_service,
                                             const RawAddress& peer_address) {
void ConnectionHandler::SdpLookupAudioRoleCb(uint16_t handle, bool found,
                                             tA2DP_Service* /*p_service*/,
                                             const RawAddress& /*peer_address*/) {
  if (device_map_.find(handle) == device_map_.end()) {
    log::warn("No device found for handle: {}", loghex(handle));
    return;
+5 −5
Original line number Diff line number Diff line
@@ -1114,7 +1114,7 @@ void Device::HandleGetTotalNumberOfItems(uint8_t label,
  }
}

void Device::GetTotalNumberOfItemsMediaPlayersResponse(uint8_t label, uint16_t curr_player,
void Device::GetTotalNumberOfItemsMediaPlayersResponse(uint8_t label, uint16_t /*curr_player*/,
                                                       std::vector<MediaPlayerInfo> list) {
  log::verbose("num_items={}", list.size());

@@ -1131,7 +1131,7 @@ void Device::GetTotalNumberOfItemsVFSResponse(uint8_t label, std::vector<ListIte
  send_message(label, true, std::move(builder));
}

void Device::GetTotalNumberOfItemsNowPlayingResponse(uint8_t label, std::string curr_song_id,
void Device::GetTotalNumberOfItemsNowPlayingResponse(uint8_t label, std::string /*curr_song_id*/,
                                                     std::vector<SongInfo> list) {
  log::verbose("num_items={}", list.size());

@@ -1179,7 +1179,7 @@ void Device::HandleChangePath(uint8_t label, std::shared_ptr<ChangePathRequest>
          base::Bind(&Device::ChangePathResponse, weak_ptr_factory_.GetWeakPtr(), label, pkt));
}

void Device::ChangePathResponse(uint8_t label, std::shared_ptr<ChangePathRequest> pkt,
void Device::ChangePathResponse(uint8_t label, std::shared_ptr<ChangePathRequest> /*pkt*/,
                                std::vector<ListItem> list) {
  // TODO (apanicke): Reconstruct the VFS ID's here. Right now it gets
  // reconstructed in GetFolderItemsVFS
@@ -1557,7 +1557,7 @@ void Device::SendMediaUpdate(bool metadata, bool play_status, bool queue) {
  }
}

void Device::SendFolderUpdate(bool available_players, bool addressed_player, bool uids) {
void Device::SendFolderUpdate(bool available_players, bool addressed_player, bool /*uids*/) {
  log::assert_that(media_interface_ != nullptr, "assert failed: media_interface_ != nullptr");
  log::verbose("");

@@ -1664,7 +1664,7 @@ void Device::PlayerSettingChangedNotificationResponse(uint8_t label, bool interi
}

void Device::HandleNowPlayingNotificationResponse(uint8_t label, bool interim,
                                                  std::string curr_song_id,
                                                  std::string /*curr_song_id*/,
                                                  std::vector<SongInfo> song_list) {
  if (interim) {
    now_playing_changed_ = Notification(true, label);
Loading