Skip to content

Commit

Permalink
Cleanup compiler warnings with NimBLE debug logs enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
h2zero committed Feb 26, 2024
1 parent 65cd834 commit 5ca40d3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/nimble/nimble/host/src/ble_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ ble_gap_log_duration(int32_t duration_ms)
if (duration_ms == BLE_HS_FOREVER) {
BLE_HS_LOG(INFO, "duration=forever");
} else {
BLE_HS_LOG(INFO, "duration=%dms", duration_ms);
BLE_HS_LOG(INFO, "duration=%" PRId32"ms", duration_ms);
}
}
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/nimble/nimble/host/src/ble_gatts.c
Original file line number Diff line number Diff line change
Expand Up @@ -2214,8 +2214,6 @@ ble_gatts_peer_cl_sup_feat_update(uint16_t conn_handle, struct os_mbuf *om)
int rc = 0;
int i;

BLE_HS_LOG(DEBUG, "");

if (!om) {
return BLE_ATT_ERR_INSUFFICIENT_RES;
}
Expand Down
2 changes: 1 addition & 1 deletion src/nimble/nimble/host/src/ble_hs.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ ble_hs_timer_sched(int32_t ticks_from_now)
}
else if (ble_npl_callout_get_ticks(&ble_hs_timer) <= ble_npl_time_get()) {
/* Reset timer if currect time is later than expiration time. */
BLE_HS_LOG(DEBUG,"exp_time:%d.now:%d.ticks:%d.active:%d.Need reset.",ble_npl_callout_get_ticks(&ble_hs_timer),ble_npl_time_get(),ticks_from_now,ble_npl_callout_is_active(&ble_hs_timer));
BLE_HS_LOG(DEBUG,"exp_time:%" PRId32".now:%" PRId32".ticks:%" PRId32".active:%" PRId16".Need reset.",ble_npl_callout_get_ticks(&ble_hs_timer),ble_npl_time_get(),ticks_from_now,ble_npl_callout_is_active(&ble_hs_timer));
ble_hs_timer_reset(ticks_from_now);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/nimble/nimble/host/store/config/src/ble_store_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ble_store_config_print_value_sec(const struct ble_store_value_sec *sec)
if (sec->csrk_present) {
BLE_HS_LOG(DEBUG, "csrk=");
ble_hs_log_flat_buf(sec->csrk, 16);
BLE_HS_LOG(DEBUG, " sign_counter = %u", sec->sign_counter);
BLE_HS_LOG(DEBUG, " sign_counter = %" PRIu32, sec->sign_counter);
}

BLE_HS_LOG(DEBUG, "\n");
Expand Down

0 comments on commit 5ca40d3

Please sign in to comment.