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

Commit 97a7f20b authored by Myles Watson's avatar Myles Watson
Browse files

Remove coverity comments

We aren't actively using coverity, and these may be out
of date.

Test: mma -j32
Change-Id: I3ce75c561dae57019597db85a383a8e434803926
parent f8a21209
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -545,10 +545,6 @@ static void bta_av_proc_stream_evt(uint8_t handle, BD_ADDR bd_addr,
    bta_sys_sendmsg(p_msg);
  }

  /* coverity[var_deref_model] */
  /* false-positive: bta_av_conn_cback only processes AVDT_CONNECT_IND_EVT and
   * AVDT_DISCONNECT_IND_EVT event
   *                 these 2 events always have associated p_data */
  if (p_data) {
    bta_av_conn_cback(handle, bd_addr, event, p_data);
  } else {
+0 −2
Original line number Diff line number Diff line
@@ -1556,8 +1556,6 @@ void bta_jv_rfcomm_connect(tBTA_JV_MSG* p_data) {

      port_state.fc_type = (PORT_FC_CTS_ON_INPUT | PORT_FC_CTS_ON_OUTPUT);

      /* coverity[uninit_use_in_call]
         false-POSITIVE: port_state is initialized at PORT_GetState() */
      PORT_SetState(handle, &port_state);

      evt_data.handle = p_cb->handle;
+0 −24
Original line number Diff line number Diff line
@@ -3357,12 +3357,6 @@ void btm_io_capabilities_req(uint8_t* p) {
  }

  if (err_code != 0) {
    /* coverity[uninit_use_in_call]
    Event uninit_use_in_call: Using uninitialized element of array
    "evt_data.bd_addr" in call to function "memcmp"
    False-positive: evt_data.bd_addr is set at the beginning with:
    STREAM_TO_BDADDR (evt_data.bd_addr, p);
    */
    btsnd_hcic_io_cap_req_neg_reply(evt_data.bd_addr, err_code);
    return;
  }
@@ -3391,12 +3385,6 @@ void btm_io_capabilities_req(uint8_t* p) {

  memcpy(btm_cb.pairing_bda, evt_data.bd_addr, BD_ADDR_LEN);

  /* coverity[uninit_use_in_call]
  Event uninit_use_in_call: Using uninitialized element of array
  "evt_data.bd_addr" in call to function "memcmp"
  False-positive: False-positive: evt_data.bd_addr is set at the beginning with:
  STREAM_TO_BDADDR (evt_data.bd_addr, p);
  */
  if (!memcmp(evt_data.bd_addr, btm_cb.connecting_bda, BD_ADDR_LEN))
    memcpy(p_dev_rec->dev_class, btm_cb.connecting_dc, DEV_CLASS_LEN);

@@ -3486,12 +3474,6 @@ void btm_io_capabilities_rsp(uint8_t* p) {

  /* We must have a device record here.
   * Use the connecting device's CoD for the connection */
  /* coverity[uninit_use_in_call]
  Event uninit_use_in_call: Using uninitialized element of array
  "evt_data.bd_addr" in call to function "memcmp"
  FALSE-POSITIVE error from Coverity test-tool. evt_data.bd_addr is set at the
  beginning with:     STREAM_TO_BDADDR (evt_data.bd_addr, p);
  */
  if (!memcmp(evt_data.bd_addr, btm_cb.connecting_bda, BD_ADDR_LEN))
    memcpy(p_dev_rec->dev_class, btm_cb.connecting_dc, DEV_CLASS_LEN);

@@ -4879,12 +4861,6 @@ static void btm_sec_pairing_timeout(UNUSED_ATTR void* data) {
#endif
  uint8_t name[2];

  /* Coverity: FALSE-POSITIVE error from Coverity tool. Please do NOT remove
   * the following comment.
   */
  /* coverity[UNUSED_VALUE] pointer p_dev_rec is actually used several times...
   * This is a Coverity false-positive, i.e. a fake issue.
   */
  p_dev_rec = btm_find_dev(p_cb->pairing_bda);

  BTM_TRACE_EVENT("%s  State: %s   Flags: %u", __func__,
+2 −28
Original line number Diff line number Diff line
@@ -201,20 +201,7 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) {
          tBTM_PM_PWR_MD settings;
          memset((void*)&settings, 0, sizeof(settings));
          settings.mode = BTM_PM_MD_ACTIVE;
          /* COVERITY
          Event uninit_use_in_call: Using uninitialized value "settings" (field
          "settings".timeout uninitialized) in call to function
          "BTM_SetPowerMode" [details]
          Event uninit_use_in_call: Using uninitialized value "settings.max" in
          call to function "BTM_SetPowerMode" [details]
          Event uninit_use_in_call: Using uninitialized value "settings.min" in
          call to function "BTM_SetPowerMode"
          // false-POSITIVE error from Coverity test-tool. Please do NOT remove
          following comment.
          // coverity[uninit_use_in_call] False-positive: setting the mode to
          BTM_PM_MD_ACTIVE only uses settings.mode the other data members of
          tBTM_PM_PWR_MD are ignored
          */

          BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr,
                           &settings);
        }
@@ -272,20 +259,7 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, uint16_t event, void* p_data) {
          tBTM_PM_PWR_MD settings;
          memset((void*)&settings, 0, sizeof(settings));
          settings.mode = BTM_PM_MD_ACTIVE;
          /* COVERITY
          Event uninit_use_in_call: Using uninitialized value "settings" (field
          "settings".timeout uninitialized) in call to function
          "BTM_SetPowerMode" [details]
          Event uninit_use_in_call: Using uninitialized value "settings.max" in
          call to function "BTM_SetPowerMode" [details]
          Event uninit_use_in_call: Using uninitialized value "settings.min" in
          call to function "BTM_SetPowerMode"
          // false-POSITIVE error from Coverity test-tool. Please do NOT remove
          following comment.
          // coverity[uninit_use_in_call] False-positive: setting the mode to
          BTM_PM_MD_ACTIVE only uses settings.mode the other data members of
          tBTM_PM_PWR_MD are ignored
          */

          BTM_SetPowerMode(BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr,
                           &settings);
        }
+0 −1
Original line number Diff line number Diff line
@@ -1081,7 +1081,6 @@ bool l2c_ucd_process_event(tL2C_CCB* p_ccb, uint16_t event, void* p_data) {

          l2c_ucd_enqueue_pending_out_sec_q(p_ccb, p_data);

          /* coverity[check_return] */ /* coverity[unchecked_value] */
          /* success changes state, failure stays in current state */
          l2c_ucd_check_pending_out_sec_q(p_ccb);
          break;
Loading