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

Commit 103c8cdb authored by William Escande's avatar William Escande
Browse files

Fix some tidy error

```
warning: argument name 'chg_aware' in comment does not match parameter
name 'chg_unaware' [bugprone-argument-comment]
    if (tcb.in_use) gatt_sr_update_cl_status(tcb, /* chg_aware= */ false);
                                                  ^~~~~~~~~~~~~~~~
                                                  /* chg_unaware= */
note: 'chg_unaware' declared here
extern void gatt_sr_update_cl_status(tGATT_TCB& tcb, bool chg_unaware);
                                                          ^
warning: the parameter 'name' is copied for each invocation but only
used as a const reference; consider making it a const reference
tGATT_IF GATT_Register(const Uuid& app_uuid128, std::string name,
                                                            ^
                                                const      &
warning: the parameter 's' is copied for each invocation but only used
as a const reference; consider making it a const reference
  void Push(std::string s) {
                        ^
            const      &
```

Test: build with tidy
Change-Id: I0827dd82bb90505a63e0ad4a87b6dfb1f78dd3b5
parent 4c39f403
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ class TimestampedStringCircularBuffer
  explicit TimestampedStringCircularBuffer(size_t size)
      : bluetooth::common::TimestampedCircularBuffer<std::string>(size) {}

  void Push(std::string s) {
  void Push(const std::string& s) {
    bluetooth::common::TimestampedCircularBuffer<std::string>::Push(
        s.substr(0, kMaxLogSize));
  }
+1 −1
Original line number Diff line number Diff line
@@ -1085,7 +1085,7 @@ void GATT_SetIdleTimeout(const RawAddress& bd_addr, uint16_t idle_tout,
 *                  with GATT
 *
 ******************************************************************************/
tGATT_IF GATT_Register(const Uuid& app_uuid128, std::string name,
tGATT_IF GATT_Register(const Uuid& app_uuid128, const std::string& name,
                       tGATT_CBACK* p_cb_info, bool eatt_support) {
  tGATT_REG* p_reg;
  uint8_t i_gatt_if = 0;
+1 −1
Original line number Diff line number Diff line
@@ -495,7 +495,7 @@ extern bool gatt_sr_is_cl_multi_variable_len_notif_supported(tGATT_TCB& tcb);

extern bool gatt_sr_is_cl_change_aware(tGATT_TCB& tcb);
extern void gatt_sr_init_cl_status(tGATT_TCB& tcb);
extern void gatt_sr_update_cl_status(tGATT_TCB& tcb, bool chg_unaware);
extern void gatt_sr_update_cl_status(tGATT_TCB& tcb, bool chg_aware);

/* Functions provided by att_protocol.cc */
extern tGATT_STATUS attp_send_cl_confirmation_msg(tGATT_TCB& tcb, uint16_t cid);
+1 −1
Original line number Diff line number Diff line
@@ -1040,7 +1040,7 @@ extern void GATT_SetIdleTimeout(const RawAddress& bd_addr, uint16_t idle_tout,
 *
 ******************************************************************************/
extern tGATT_IF GATT_Register(const bluetooth::Uuid& p_app_uuid128,
                              const std::string name, tGATT_CBACK* p_cb_info,
                              const std::string& name, tGATT_CBACK* p_cb_info,
                              bool eatt_support);

/*******************************************************************************
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF* p_gatt_if,
  return test::mock::stack_gatt_api::GATT_GetConnectionInfor(
      conn_id, p_gatt_if, bd_addr, p_transport);
}
tGATT_IF GATT_Register(const Uuid& app_uuid128, std::string name,
tGATT_IF GATT_Register(const Uuid& app_uuid128, const std::string& name,
                       tGATT_CBACK* p_cb_info, bool eatt_support) {
  mock_function_count_map[__func__]++;
  return test::mock::stack_gatt_api::GATT_Register(app_uuid128, name, p_cb_info,
Loading