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

Commit f0cb78c7 authored by Chris Manton's avatar Chris Manton
Browse files

mock: Comment out unused variables [mock_btif_]

Bug: 323991487
Test: m .
Flag: EXEMPT, test mock infrastructure

Change-Id: Id47599f66ee83b251cf0f6dd6e734d5078d6cf41
parent a13166b8
Loading
Loading
Loading
Loading
+28 −26
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ namespace btif_av {
// Return: void
struct btif_av_acl_disconnected {
  std::function<void(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) {}};
      [](const RawAddress& /* peer_address */) {}};
  void operator()(const RawAddress& peer_address) { body(peer_address); };
};
extern struct btif_av_acl_disconnected btif_av_acl_disconnected;
@@ -81,7 +81,7 @@ extern struct btif_av_clear_remote_suspend_flag
struct btif_av_find_by_handle {
  static const RawAddress& return_value;
  std::function<const RawAddress&(tBTA_AV_HNDL bta_handle)> body{
      [](tBTA_AV_HNDL bta_handle) { return return_value; }};
      [](tBTA_AV_HNDL /* bta_handle */) { return return_value; }};
  const RawAddress& operator()(tBTA_AV_HNDL bta_handle) {
    return body(bta_handle);
  };
@@ -166,7 +166,7 @@ extern struct btif_av_is_connected btif_av_is_connected;
struct btif_av_is_connected_addr {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -179,7 +179,7 @@ extern struct btif_av_is_connected_addr btif_av_is_connected_addr;
struct btif_av_is_peer_edr {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -192,7 +192,7 @@ extern struct btif_av_is_peer_edr btif_av_is_peer_edr;
struct btif_av_is_peer_silenced {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -225,7 +225,7 @@ extern struct btif_av_is_source_enabled btif_av_is_source_enabled;
struct btif_av_peer_is_connected_sink {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -238,7 +238,7 @@ extern struct btif_av_peer_is_connected_sink btif_av_peer_is_connected_sink;
struct btif_av_peer_is_connected_source {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -251,7 +251,7 @@ extern struct btif_av_peer_is_connected_source btif_av_peer_is_connected_source;
struct btif_av_peer_is_sink {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -264,7 +264,7 @@ extern struct btif_av_peer_is_sink btif_av_peer_is_sink;
struct btif_av_peer_is_source {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -277,7 +277,7 @@ extern struct btif_av_peer_is_source btif_av_peer_is_source;
struct btif_av_peer_prefers_mandatory_codec {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -291,7 +291,7 @@ extern struct btif_av_peer_prefers_mandatory_codec
struct btif_av_peer_supports_3mbps {
  static bool return_value;
  std::function<bool(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) { return return_value; }};
      [](const RawAddress& /* peer_address */) { return return_value; }};
  bool operator()(const RawAddress& peer_address) {
    return body(peer_address);
  };
@@ -310,12 +310,12 @@ struct btif_av_report_source_codec_state {
      const std::vector<btav_a2dp_codec_config_t>& codecs_local_capabilities,
      const std::vector<btav_a2dp_codec_config_t>&
          codecs_selectable_capabilities)>
      body{[](const RawAddress& peer_address,
              const btav_a2dp_codec_config_t& codec_config,
      body{[](const RawAddress& /* peer_address */,
              const btav_a2dp_codec_config_t& /* codec_config */,
              const std::vector<btav_a2dp_codec_config_t>&
                  codecs_local_capabilities,
              /* codecs_local_capabilities */,
              const std::vector<btav_a2dp_codec_config_t>&
                  codecs_selectable_capabilities) {}};
              /* codecs_selectable_capabilities */) {}};
  void operator()(
      const RawAddress& peer_address,
      const btav_a2dp_codec_config_t& codec_config,
@@ -343,7 +343,7 @@ extern struct btif_av_reset_audio_delay btif_av_reset_audio_delay;
// Return: void
struct btif_av_set_audio_delay {
  std::function<void(const RawAddress& peer_address, uint16_t delay)> body{
      [](const RawAddress& peer_address, uint16_t delay) {}};
      [](const RawAddress& /* peer_address */, uint16_t /* delay */) {}};
  void operator()(const RawAddress& peer_address, uint16_t delay) {
    body(peer_address, delay);
  };
@@ -355,7 +355,7 @@ extern struct btif_av_set_audio_delay btif_av_set_audio_delay;
// Return: void
struct btif_av_set_dynamic_audio_buffer_size {
  std::function<void(uint8_t dynamic_audio_buffer_size)> body{
      [](uint8_t dynamic_audio_buffer_size) {}};
      [](uint8_t /* dynamic_audio_buffer_size */) {}};
  void operator()(uint8_t dynamic_audio_buffer_size) {
    body(dynamic_audio_buffer_size);
  };
@@ -367,7 +367,8 @@ extern struct btif_av_set_dynamic_audio_buffer_size
// Params: bool is_low_latency
// Return: void
struct btif_av_set_low_latency {
  std::function<void(bool is_low_latency)> body{[](bool is_low_latency) {}};
  std::function<void(bool is_low_latency)> body{
      [](bool /* is_low_latency */) {}};
  void operator()(bool is_low_latency) { body(is_low_latency); };
};
extern struct btif_av_set_low_latency btif_av_set_low_latency;
@@ -388,7 +389,7 @@ extern struct btif_av_sink_active_peer btif_av_sink_active_peer;
struct btif_av_sink_execute_service {
  static bt_status_t return_value;
  std::function<bt_status_t(bool enable)> body{
      [](bool enable) { return return_value; }};
      [](bool /* enable */) { return return_value; }};
  bt_status_t operator()(bool enable) { return body(enable); };
};
extern struct btif_av_sink_execute_service btif_av_sink_execute_service;
@@ -409,7 +410,7 @@ extern struct btif_av_source_active_peer btif_av_source_active_peer;
struct btif_av_source_execute_service {
  static bt_status_t return_value;
  std::function<bt_status_t(bool enable)> body{
      [](bool enable) { return return_value; }};
      [](bool /* enable */) { return return_value; }};
  bt_status_t operator()(bool enable) { return body(enable); };
};
extern struct btif_av_source_execute_service btif_av_source_execute_service;
@@ -419,7 +420,7 @@ extern struct btif_av_source_execute_service btif_av_source_execute_service;
// Return: void
struct btif_av_src_disconnect_sink {
  std::function<void(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) {}};
      [](const RawAddress& /* peer_address */) {}};
  void operator()(const RawAddress& peer_address) { body(peer_address); };
};
extern struct btif_av_src_disconnect_sink btif_av_src_disconnect_sink;
@@ -466,7 +467,8 @@ extern struct btif_av_stream_start_offload btif_av_stream_start_offload;
// Params: bool use_latency_mode
// Return: void
struct btif_av_stream_start_with_latency {
  std::function<void(bool use_latency_mode)> body{[](bool use_latency_mode) {}};
  std::function<void(bool use_latency_mode)> body{
      [](bool /* use_latency_mode */) {}};
  void operator()(bool use_latency_mode) { body(use_latency_mode); };
};
extern struct btif_av_stream_start_with_latency
@@ -487,7 +489,7 @@ extern struct btif_av_stream_started_ready btif_av_stream_started_ready;
// Return: void
struct btif_av_stream_stop {
  std::function<void(const RawAddress& peer_address)> body{
      [](const RawAddress& peer_address) {}};
      [](const RawAddress& /* peer_address */) {}};
  void operator()(const RawAddress& peer_address) { body(peer_address); };
};
extern struct btif_av_stream_stop btif_av_stream_stop;
@@ -505,7 +507,7 @@ extern struct btif_av_stream_suspend btif_av_stream_suspend;
// Params: int fd
// Return: void
struct btif_debug_av_dump {
  std::function<void(int fd)> body{[](int fd) {}};
  std::function<void(int fd)> body{[](int /* fd */) {}};
  void operator()(int fd) { body(fd); };
};
extern struct btif_debug_av_dump btif_debug_av_dump;
@@ -516,7 +518,7 @@ extern struct btif_debug_av_dump btif_debug_av_dump;
struct dump_av_sm_event_name {
  static const char* return_value;
  std::function<const char*(int event)> body{
      [](int event) { return return_value; }};
      [](int /* event */) { return return_value; }};
  const char* operator()(int event) { return body(event); };
};
extern struct dump_av_sm_event_name dump_av_sm_event_name;
@@ -526,7 +528,7 @@ extern struct dump_av_sm_event_name dump_av_sm_event_name;
// Return: void
struct src_do_suspend_in_main_thread {
  std::function<void(btif_av_sm_event_t event)> body{
      [](btif_av_sm_event_t event) {}};
      [](btif_av_sm_event_t /* event */) {}};
  void operator()(btif_av_sm_event_t event) { body(event); };
};
extern struct src_do_suspend_in_main_thread src_do_suspend_in_main_thread;
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ namespace btif_avrcp_service {
// Return: void
struct do_in_avrcp_jni {
  std::function<void(const base::Closure& task)> body{
      [](const base::Closure& task) {}};
      [](const base::Closure& /* task */) {}};
  void operator()(const base::Closure& task) { body(task); };
};
extern struct do_in_avrcp_jni do_in_avrcp_jni;
+18 −11
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ extern struct is_restricted_mode is_restricted_mode;
// Params: uint8_t enable
// Returns: int
struct dut_mode_configure {
  std::function<int(uint8_t enable)> body{[](uint8_t enable) { return 0; }};
  std::function<int(uint8_t enable)> body{
      [](uint8_t /* enable */) { return 0; }};
  int operator()(uint8_t enable) { return body(enable); };
};
extern struct dut_mode_configure dut_mode_configure;
@@ -70,8 +71,11 @@ extern struct dut_mode_configure dut_mode_configure;
// Params: uint16_t opcode, uint8_t* buf, uint8_t len
// Returns: int
struct dut_mode_send {
  std::function<int(uint16_t opcode, uint8_t* buf, uint8_t len)> body{
      [](uint16_t opcode, uint8_t* buf, uint8_t len) { return 0; }};
  std::function<int(uint16_t /* opcode */, uint8_t* /* buf */,
                    uint8_t /* len */)>
      body{[](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) {
        return 0;
      }};
  int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) {
    return body(opcode, buf, len);
  };
@@ -91,7 +95,7 @@ extern struct get_common_criteria_config_compare_result
// Returns: int
struct get_remote_device_properties {
  std::function<int(RawAddress* remote_addr)> body{
      [](RawAddress* remote_addr) { return 0; }};
      [](RawAddress* /* remote_addr */) { return 0; }};
  int operator()(RawAddress* remote_addr) { return body(remote_addr); };
};
extern struct get_remote_device_properties get_remote_device_properties;
@@ -100,7 +104,9 @@ extern struct get_remote_device_properties get_remote_device_properties;
// Returns: int
struct get_remote_device_property {
  std::function<int(RawAddress* remote_addr, bt_property_type_t type)> body{
      [](RawAddress* remote_addr, bt_property_type_t type) { return 0; }};
      [](RawAddress* /* remote_addr */, bt_property_type_t /* type */) {
        return 0;
      }};
  int operator()(RawAddress* remote_addr, bt_property_type_t type) {
    return body(remote_addr, type);
  };
@@ -111,7 +117,7 @@ extern struct get_remote_device_property get_remote_device_property;
// Returns: int
struct get_remote_services {
  std::function<int(RawAddress* remote_addr)> body{
      [](RawAddress* remote_addr) { return 0; }};
      [](RawAddress* /* remote_addr */) { return 0; }};
  int operator()(RawAddress* remote_addr) { return body(remote_addr); };
};
extern struct get_remote_services get_remote_services;
@@ -120,7 +126,9 @@ extern struct get_remote_services get_remote_services;
// Returns: int
struct le_test_mode {
  std::function<int(uint16_t opcode, uint8_t* buf, uint8_t len)> body{
      [](uint16_t opcode, uint8_t* buf, uint8_t len) { return 0; }};
      [](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) {
        return 0;
      }};
  int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) {
    return body(opcode, buf, len);
  };
@@ -131,9 +139,8 @@ extern struct le_test_mode le_test_mode;
// Returns: int
struct set_remote_device_property {
  std::function<int(RawAddress* remote_addr, const bt_property_t* property)>
      body{[](RawAddress* remote_addr, const bt_property_t* property) {
        return 0;
      }};
      body{[](RawAddress* /* remote_addr */,
              const bt_property_t* /* property */) { return 0; }};
  int operator()(RawAddress* remote_addr, const bt_property_t* property) {
    return body(remote_addr, property);
  };
@@ -144,7 +151,7 @@ extern struct set_remote_device_property set_remote_device_property;
// Returns: void
struct set_hal_cbacks {
  std::function<void(bt_callbacks_t* callbacks)> body{
      [](bt_callbacks_t* callbacks) { ; }};
      [](bt_callbacks_t* /* callbacks */) { ; }};
  void operator()(bt_callbacks_t* callbacks) { body(callbacks); };
};
extern struct set_hal_cbacks set_hal_cbacks;
+2 −2
Original line number Diff line number Diff line
@@ -26,11 +26,11 @@
namespace bluetooth {
namespace bqr {

void DumpLmpLlMessage(uint8_t length, const uint8_t* p_event) {
void DumpLmpLlMessage(uint8_t /* length */, const uint8_t* /* p_event */) {
  inc_func_call_count(__func__);
}

void DumpBtScheduling(uint8_t length, const uint8_t* p_event) {
void DumpBtScheduling(uint8_t /* length */, const uint8_t* /* p_event */) {
  inc_func_call_count(__func__);
}

+11 −9
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ namespace btif_bta_pan_co_rx {
// Returns: uint8_t
struct bta_pan_co_init {
  std::function<uint8_t(uint8_t* q_level)> body{
      [](uint8_t* q_level) { return 0; }};
      [](uint8_t* /* q_level */) { return 0; }};
  uint8_t operator()(uint8_t* q_level) { return body(q_level); };
};
extern struct bta_pan_co_init bta_pan_co_init;
@@ -46,7 +46,7 @@ extern struct bta_pan_co_init bta_pan_co_init;
// Returns: void
struct bta_pan_co_close {
  std::function<void(uint16_t handle, uint8_t app_id)> body{
      [](uint16_t handle, uint8_t app_id) { ; }};
      [](uint16_t /* handle */, uint8_t /* app_id */) { ; }};
  void operator()(uint16_t handle, uint8_t app_id) { body(handle, app_id); };
};
extern struct bta_pan_co_close bta_pan_co_close;
@@ -57,8 +57,9 @@ extern struct bta_pan_co_close bta_pan_co_close;
struct bta_pan_co_mfilt_ind {
  std::function<void(uint16_t handle, bool indication, tBTA_PAN_STATUS result,
                     uint16_t len, uint8_t* p_filters)>
      body{[](uint16_t handle, bool indication, tBTA_PAN_STATUS result,
              uint16_t len, uint8_t* p_filters) { ; }};
      body{[](uint16_t /* handle */, bool /* indication */,
              tBTA_PAN_STATUS /* result */, uint16_t /* len */,
              uint8_t* /* p_filters */) { ; }};
  void operator()(uint16_t handle, bool indication, tBTA_PAN_STATUS result,
                  uint16_t len, uint8_t* p_filters) {
    body(handle, indication, result, len, p_filters);
@@ -72,8 +73,9 @@ extern struct bta_pan_co_mfilt_ind bta_pan_co_mfilt_ind;
struct bta_pan_co_pfilt_ind {
  std::function<void(uint16_t handle, bool indication, tBTA_PAN_STATUS result,
                     uint16_t len, uint8_t* p_filters)>
      body{[](uint16_t handle, bool indication, tBTA_PAN_STATUS result,
              uint16_t len, uint8_t* p_filters) { ; }};
      body{[](uint16_t /* handle */, bool /* indication */,
              tBTA_PAN_STATUS /* result */, uint16_t /* len */,
              uint8_t* /* p_filters */) { ; }};
  void operator()(uint16_t handle, bool indication, tBTA_PAN_STATUS result,
                  uint16_t len, uint8_t* p_filters) {
    body(handle, indication, result, len, p_filters);
@@ -85,7 +87,7 @@ extern struct bta_pan_co_pfilt_ind bta_pan_co_pfilt_ind;
// bool enable Returns: void
struct bta_pan_co_rx_flow {
  std::function<void(uint16_t handle, uint8_t app_id, bool enable)> body{
      [](uint16_t handle, uint8_t app_id, bool enable) { ; }};
      [](uint16_t /* handle */, uint8_t /* app_id */, bool /* enable */) { ; }};
  void operator()(uint16_t handle, uint8_t app_id, bool enable) {
    body(handle, app_id, enable);
  };
@@ -96,7 +98,7 @@ extern struct bta_pan_co_rx_flow bta_pan_co_rx_flow;
// Returns: void
struct bta_pan_co_rx_path {
  std::function<void(uint16_t handle, uint8_t app_id)> body{
      [](uint16_t handle, uint8_t app_id) { ; }};
      [](uint16_t /* handle */, uint8_t /* app_id */) { ; }};
  void operator()(uint16_t handle, uint8_t app_id) { body(handle, app_id); };
};
extern struct bta_pan_co_rx_path bta_pan_co_rx_path;
@@ -105,7 +107,7 @@ extern struct bta_pan_co_rx_path bta_pan_co_rx_path;
// Returns: void
struct bta_pan_co_tx_path {
  std::function<void(uint16_t handle, uint8_t app_id)> body{
      [](uint16_t handle, uint8_t app_id) { ; }};
      [](uint16_t /* handle */, uint8_t /* app_id */) { ; }};
  void operator()(uint16_t handle, uint8_t app_id) { body(handle, app_id); };
};
extern struct bta_pan_co_tx_path bta_pan_co_tx_path;
Loading