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

Commit 7004a39f authored by Henri Chataing's avatar Henri Chataing
Browse files

system/audio_bluetooth_hw/Android.bp: Enforce -Wunused-parameter

Bug: 299772495
Test: m com.android.btservices
Flag: EXEMPT, mechanical refactor
Change-Id: Ib88a5957007d83f179e722672ac891c615f5c2d2
parent 1e4b6842
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ cc_library_shared {
        "libbluetooth_audio_session",
        "libhidlbase",
    ],
    cflags: ["-Wno-unused-parameter"],
    visibility: [
        "//device/generic/goldfish/audio",
    ],
+17 −11
Original line number Diff line number Diff line
@@ -51,43 +51,49 @@ static int adev_set_parameters(struct audio_hw_device* dev, const char* kvpairs)
  return 0;
}

static char* adev_get_parameters(const struct audio_hw_device* dev, const char* keys) {
static char* adev_get_parameters(const struct audio_hw_device* /*dev*/, const char* keys) {
  LOG(VERBOSE) << __func__ << ": keys=[" << keys << "]";
  return strdup("");
}

static int adev_init_check(const struct audio_hw_device* dev) { return 0; }
static int adev_init_check(const struct audio_hw_device* /*dev*/) { return 0; }

static int adev_set_voice_volume(struct audio_hw_device* dev, float volume) {
static int adev_set_voice_volume(struct audio_hw_device* /*dev*/, float volume) {
  LOG(VERBOSE) << __func__ << ": volume=" << volume;
  return -ENOSYS;
}

static int adev_set_master_volume(struct audio_hw_device* dev, float volume) {
static int adev_set_master_volume(struct audio_hw_device* /*dev*/, float volume) {
  LOG(VERBOSE) << __func__ << ": volume=" << volume;
  return -ENOSYS;
}

static int adev_get_master_volume(struct audio_hw_device* dev, float* volume) { return -ENOSYS; }
static int adev_get_master_volume(struct audio_hw_device* /*dev*/, float* /*volume*/) {
  return -ENOSYS;
}

static int adev_set_master_mute(struct audio_hw_device* dev, bool muted) {
static int adev_set_master_mute(struct audio_hw_device* /*dev*/, bool muted) {
  LOG(VERBOSE) << __func__ << ": mute=" << muted;
  return -ENOSYS;
}

static int adev_get_master_mute(struct audio_hw_device* dev, bool* muted) { return -ENOSYS; }
static int adev_get_master_mute(struct audio_hw_device* /*dev*/, bool* /*muted*/) {
  return -ENOSYS;
}

static int adev_set_mode(struct audio_hw_device* dev, audio_mode_t mode) {
static int adev_set_mode(struct audio_hw_device* /*dev*/, audio_mode_t mode) {
  LOG(VERBOSE) << __func__ << ": mode=" << mode;
  return 0;
}

static int adev_set_mic_mute(struct audio_hw_device* dev, bool state) {
static int adev_set_mic_mute(struct audio_hw_device* /*dev*/, bool state) {
  LOG(VERBOSE) << __func__ << ": state=" << state;
  return -ENOSYS;
}

static int adev_get_mic_mute(const struct audio_hw_device* dev, bool* state) { return -ENOSYS; }
static int adev_get_mic_mute(const struct audio_hw_device* /*dev*/, bool* /*state*/) {
  return -ENOSYS;
}

static int adev_create_audio_patch(struct audio_hw_device* device, unsigned int num_sources,
                                   const struct audio_port_config* sources, unsigned int num_sinks,
@@ -145,7 +151,7 @@ static int adev_get_audio_port(struct audio_hw_device* device, struct audio_port
  return -ENOSYS;
}

static int adev_dump(const audio_hw_device_t* device, int fd) { return 0; }
static int adev_dump(const audio_hw_device_t* /*device*/, int /*fd*/) { return 0; }

static int adev_close(hw_device_t* device) {
  auto* bluetooth_device = reinterpret_cast<BluetoothAudioDevice*>(device);
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ bool BluetoothAudioPortAidl::SetUp(audio_devices_t devices) {

  state_ = BluetoothStreamState::STANDBY;

  auto control_result_cb = [port = this](uint16_t cookie, bool start_resp,
  auto control_result_cb = [port = this](uint16_t cookie, bool /*start_resp*/,
                                         const BluetoothAudioStatus& status) {
    if (!port->in_use()) {
      LOG(ERROR) << "control_result_cb: BluetoothAudioPortAidl is not in use";
+4 −4
Original line number Diff line number Diff line
@@ -101,16 +101,16 @@ public:
  /***
   * Set the current BluetoothStreamState
   ***/
  virtual void SetState(BluetoothStreamState state) {}
  virtual void SetState(BluetoothStreamState /*state*/) {}

  virtual bool IsA2dp() const { return false; }

  virtual bool IsLeAudio() const { return false; }

  virtual bool GetPreferredDataIntervalUs(size_t* interval_us) const { return false; }
  virtual bool GetPreferredDataIntervalUs(size_t* /*interval_us*/) const { return false; }

  virtual size_t WriteData(const void* buffer, size_t bytes) const { return 0; }
  virtual size_t ReadData(void* buffer, size_t bytes) const { return 0; }
  virtual size_t WriteData(const void* /*buffer*/, size_t /*bytes*/) const { return 0; }
  virtual size_t ReadData(void* /*buffer*/, size_t /*bytes*/) const { return 0; }
};

namespace aidl {
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ bool BluetoothAudioPortHidl::SetUp(audio_devices_t devices) {

  state_ = BluetoothStreamState::STANDBY;

  auto control_result_cb = [port = this](uint16_t cookie, bool start_resp,
  auto control_result_cb = [port = this](uint16_t cookie, bool /*start_resp*/,
                                         const BluetoothAudioStatusHidl& status) {
    if (!port->in_use()) {
      LOG(ERROR) << "control_result_cb: BluetoothAudioPort is not in use";
Loading