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

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

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

Bug: 299772495
Test: m com.android.btservices
Flag: EXEMPT, mechanical refactor
Change-Id: I38b5703e475860493876ef1d326a3e7bad2978a3
parent 68290871
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -133,7 +133,6 @@ cc_library_static {
        "vc/vc.cc",
    ],
    cflags: [
        "-Wno-unused-parameter",
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
        "-fvisibility=default",
    ],
@@ -204,7 +203,6 @@ cc_library_static {
        "sys/utl.cc",
    ],
    cflags: [
        "-Wno-unused-parameter",
        /* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
        "-fvisibility=default",
    ],
@@ -333,7 +331,6 @@ cc_test {
    ],
    cflags: [
        "-Wno-macro-redefined",
        "-Wno-unused-parameter",
    ],
    target: {
        android: {
@@ -399,7 +396,6 @@ cc_test {
        "libcom.android.sysprop.bluetooth.wrapped",
        "libgmock",
    ],
    cflags: ["-Wno-unused-parameter"],
}

// bta unit tests for target
@@ -448,7 +444,6 @@ cc_test {
        "libosi",
        "libstatslog_bt",
    ],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -513,7 +508,6 @@ cc_test {
            ],
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

// csis unit tests for host
@@ -576,7 +570,6 @@ cc_test {
            undefined: true,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

// groups unit tests for host
@@ -623,7 +616,6 @@ cc_test {
            undefined: true,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

// bta unit tests for host
@@ -676,7 +668,6 @@ cc_test {
    sanitize: {
        cfi: false,
    },
    cflags: ["-Wno-unused-parameter"],
}

genrule {
@@ -835,7 +826,6 @@ cc_test {
        cfi: false,
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -945,7 +935,6 @@ cc_test {
        cfi: false,
    },
    header_libs: ["libbluetooth_headers"],
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1064,7 +1053,6 @@ cc_test {
            undefined: true,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1131,7 +1119,6 @@ cc_test {
            undefined: true,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1209,7 +1196,6 @@ cc_test {
            undefined: true,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1270,7 +1256,6 @@ cc_test {
            undefined: true,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
@@ -1349,7 +1334,6 @@ cc_test {
            undefined: true,
        },
    },
    cflags: ["-Wno-unused-parameter"],
}

cc_test {
+2 −2
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ void bta_ag_register(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_deregister(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
void bta_ag_deregister(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /*data*/) {
  /* set dealloc */
  p_scb->dealloc = true;

@@ -169,7 +169,7 @@ void bta_ag_deregister(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_start_dereg(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
void bta_ag_start_dereg(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /*data*/) {
  /* set dealloc */
  p_scb->dealloc = true;

+5 −4
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ static uint8_t bta_ag_parse_chld(tBTA_AG_SCB* /* p_scb */, char* p_s) {
 * Returns          Returns bitmap of supported codecs.
 *
 ******************************************************************************/
static tBTA_AG_PEER_CODEC bta_ag_parse_bac(tBTA_AG_SCB* p_scb, char* p_s, char* p_end) {
static tBTA_AG_PEER_CODEC bta_ag_parse_bac(tBTA_AG_SCB* /*p_scb*/, char* p_s, char* p_end) {
  tBTA_AG_PEER_CODEC retval = BTM_SCO_CODEC_NONE;
  tBTA_AG_UUID_CODEC uuid_codec;
  char* p;
@@ -1891,7 +1891,8 @@ void bta_ag_send_bcs(tBTA_AG_SCB* p_scb) {
 * Returns          true if we can, false if not
 *
 ******************************************************************************/
bool bta_ag_is_sco_open_allowed(tBTA_AG_SCB* p_scb, const std::string event) {
bool bta_ag_is_sco_open_allowed([[maybe_unused]] tBTA_AG_SCB* p_scb,
                                [[maybe_unused]] const std::string event) {
#ifdef __ANDROID__
  /* Do not open SCO if 1. the dual mode audio system property is enabled,
  2. LEA is active, and 3. LEA is preferred for DUPLEX */
@@ -1952,7 +1953,7 @@ void bta_ag_send_ring(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /* data */) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_send_qcs(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data) {
void bta_ag_send_qcs(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* /*p_data*/) {
  tBTA_AG_UUID_CODEC codec_uuid;
  if (p_scb->codec_fallback) {
    if (p_scb->peer_codecs & BTM_SCO_CODEC_MSBC) {
@@ -1977,7 +1978,7 @@ void bta_ag_send_qcs(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_send_qac(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data) {
void bta_ag_send_qac(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* /*p_data*/) {
  if (!get_swb_codec_status(bluetooth::headset::BTHF_SWB_CODEC_VENDOR_APTX, &p_scb->peer_addr)) {
    log::verbose("send +QAC codecs unsupported");
    bta_ag_send_result(p_scb, BTA_AG_LOCAL_RES_QAC, SWB_CODECS_UNSUPPORTED, 0);
+1 −1
Original line number Diff line number Diff line
@@ -1555,7 +1555,7 @@ void bta_ag_sco_conn_close(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /* data */) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_sco_conn_rsp(tBTA_AG_SCB* p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA* p_data) {
void bta_ag_sco_conn_rsp(tBTA_AG_SCB* p_scb, tBTM_ESCO_CONN_REQ_EVT_DATA* /*p_data*/) {
  bta_ag_cb.sco.is_local = false;

  log::verbose("eSCO {}, state {}",
+1 −1
Original line number Diff line number Diff line
@@ -542,6 +542,6 @@ void bta_ag_do_disc(tBTA_AG_SCB* p_scb, tBTA_SERVICE_MASK service) {
 * Returns          void
 *
 ******************************************************************************/
void bta_ag_free_db(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& data) {
void bta_ag_free_db(tBTA_AG_SCB* p_scb, const tBTA_AG_DATA& /*data*/) {
  osi_free_and_reset((void**)&p_scb->p_disc_db);
}
Loading