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

Commit cf2c8a9d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "cpplint: fix the majority of runtime/int" into main

parents 0fc53d6c c4611d04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1244,7 +1244,7 @@ public:
  void OnDistanceMeasurementResult(RawAddress address, uint32_t centimeter,
                                   uint32_t error_centimeter, int azimuth_angle,
                                   int error_azimuth_angle, int altitude_angle,
                                   int error_altitude_angle, long elapsedRealtimeNanos,
                                   int error_altitude_angle, uint64_t elapsedRealtimeNanos,
                                   int8_t confidence_level, uint8_t method) {
    std::shared_lock<std::shared_mutex> lock(callbacks_mutex);
    CallbackEnv sCallbackEnv(__func__);
+2 −2
Original line number Diff line number Diff line
@@ -616,7 +616,7 @@ void bta_ag_at_hsp_cback(tBTA_AG_SCB* p_scb, uint16_t command_id, uint8_t arg_ty
  val.hdr.app_id = p_scb->app_id;
  val.num = (uint16_t)int_arg;

  if ((p_end - p_arg + 1) >= (long)sizeof(val.str)) {
  if ((p_end - p_arg + 1) >= (ptrdiff_t)sizeof(val.str)) {
    log::error("p_arg is too long, send error and return");
    bta_ag_send_error(p_scb, BTA_AG_ERR_TEXT_TOO_LONG);
    return;
@@ -894,7 +894,7 @@ void bta_ag_at_hfp_cback(tBTA_AG_SCB* p_scb, uint16_t cmd, uint8_t arg_type, cha
  val.num = static_cast<uint32_t>(int_arg);
  val.bd_addr = p_scb->peer_addr;

  if ((p_end - p_arg + 1) >= (long)sizeof(val.str)) {
  if ((p_end - p_arg + 1) >= (ptrdiff_t)sizeof(val.str)) {
    log::error("p_arg is too long for cmd 0x{:x}, send error and return", cmd);
    bta_ag_send_error(p_scb, BTA_AG_ERR_TEXT_TOO_LONG);
    return;
+2 −3
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ namespace {

struct WaitForAllAclConnectionsToDrain {
  uint64_t time_to_wait_in_ms;
  unsigned long TimeToWaitInMs() const { return static_cast<unsigned long>(time_to_wait_in_ms); }
  uint64_t TimeToWaitInMs() const { return time_to_wait_in_ms; }
  void* AlarmCallbackData() const { return const_cast<void*>(static_cast<const void*>(this)); }

  static const WaitForAllAclConnectionsToDrain* FromAlarmCallbackData(void* data);
@@ -339,8 +339,7 @@ void bta_dm_disable() {
        bta_dm_disable_conn_down_timer_cback(nullptr);
        break;
      default:
        log::debug("Set timer to delay disable initiation:{} ms",
                   static_cast<unsigned long>(disable_delay_ms));
        log::debug("Set timer to delay disable initiation:{} ms", disable_delay_ms);
        alarm_set_on_mloop(bta_dm_cb.disable_timer, disable_delay_ms,
                           bta_dm_disable_conn_down_timer_cback, nullptr);
    }
+1 −2
Original line number Diff line number Diff line
@@ -486,8 +486,7 @@ tBTA_DM_SSR_SPEC bta_dm_ssr_spec[] = {
           default max latency and min remote timeout as 0, and always read
           individual device preference from HH module */
        {0, 0, 2, "hid_host"},
        {1200, 2, 2, "sniff_capable"},  /* BTA_DM_PM_SSR2 - others (as long as sniff
                                           is allowed)*/
        {1200, 2, 2, "sniff_capable"},  /* BTA_DM_PM_SSR2 - others (only if sniff is allowed) */
        {360, 160, 1600, "hid_device"}, /* BTA_DM_PM_SSR3 - HD */
        {1200, 65534, 65534, "a2dp"}    /* BTA_DM_PM_SSR4 - A2DP streaming */
};
+1 −1
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ constexpr size_t kSearchStateHistorySize = 50;
constexpr char kTimeFormatString[] = "%Y-%m-%d %H:%M:%S";

constexpr unsigned MillisPerSecond = 1000;
std::string EpochMillisToString(long long time_ms) {
std::string EpochMillisToString(uint64_t time_ms) {
  time_t time_sec = time_ms / MillisPerSecond;
  struct tm tm;
  localtime_r(&time_sec, &tm);
Loading