diff --git a/example/pan_lwip_http_server.c b/example/pan_lwip_http_server.c index 37126fbae..4374bcb44 100644 --- a/example/pan_lwip_http_server.c +++ b/example/pan_lwip_http_server.c @@ -242,7 +242,7 @@ int fs_open_custom(struct fs_file *file, const char *name){ if (*name != '/') return 0; uint32_t file_size = btstack_atoi(&name[1]); if (file_size > 0) { - printf("Serving '%s' with %u bytes\n", name, file_size); + printf("Serving '%s' with %"PRIu32" bytes\n", name, file_size); /* initialize fs_file correctly */ memset(file, 0, sizeof(struct fs_file)); file->len = file_size; diff --git a/example/sm_pairing_central.c b/example/sm_pairing_central.c index dba934874..18b021a48 100644 --- a/example/sm_pairing_central.c +++ b/example/sm_pairing_central.c @@ -69,7 +69,7 @@ #define REMOTE_SERVICE 0x1111 // Fixed passkey - used with sm_pairing_peripheral. Passkey is random in general -#define FIXED_PASSKEY 123456 +#define FIXED_PASSKEY 123456U static btstack_packet_callback_registration_t hci_event_callback_registration; @@ -237,7 +237,7 @@ static void sm_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *pa break; case SM_EVENT_PASSKEY_INPUT_NUMBER: printf("Passkey Input requested\n"); - printf("Sending fixed passkey %"PRIu32"\n", FIXED_PASSKEY); + printf("Sending fixed passkey %"PRIu32"\n", (uint32_t) FIXED_PASSKEY); sm_passkey_input(sm_event_passkey_input_number_get_handle(packet), FIXED_PASSKEY); break; case SM_EVENT_PAIRING_COMPLETE: diff --git a/src/classic/a2dp_source.c b/src/classic/a2dp_source.c index ee31d8d81..4a8b7e674 100644 --- a/src/classic/a2dp_source.c +++ b/src/classic/a2dp_source.c @@ -741,7 +741,7 @@ uint8_t a2dp_source_reconfigure_stream_sampling_frequency(uint16_t avdtp_cid, ui config |= (AVDTP_SBC_16000 << 4); break; default: - log_error("Unsupported sampling frequency %u", sampling_frequency); + log_error("Unsupported sampling frequency %u", (int) sampling_frequency); return ERROR_CODE_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE; } sc.local_stream_endpoint->media_codec_sbc_info[0] = config; diff --git a/src/classic/hfp_ag.c b/src/classic/hfp_ag.c index 897630964..5110a604a 100644 --- a/src/classic/hfp_ag.c +++ b/src/classic/hfp_ag.c @@ -1861,17 +1861,17 @@ static void hfp_ag_handle_rfcomm_data(uint8_t packet_type, uint16_t channel, uin hfp_connection->send_error = 1; return; } - log_info("HF Indicator 'enhanced security' set to %u", hfp_connection->parser_indicator_value); + log_info("HF Indicator 'enhanced security' set to %u", (unsigned int) hfp_connection->parser_indicator_value); break; case 2: // battery level if (hfp_connection->parser_indicator_value > 100){ hfp_connection->send_error = 1; return; } - log_info("HF Indicator 'battery' set to %u", hfp_connection->parser_indicator_value); + log_info("HF Indicator 'battery' set to %u", (unsigned int) hfp_connection->parser_indicator_value); break; default: - log_info("HF Indicator unknown set to %u", hfp_connection->parser_indicator_value); + log_info("HF Indicator unknown set to %u", (unsigned int) hfp_connection->parser_indicator_value); break; } hfp_connection->ok_pending = 1; diff --git a/src/l2cap.c b/src/l2cap.c index cbe8a3cb6..e74b3e2db 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -4005,7 +4005,7 @@ static void l2cap_sm_packet_handler(uint8_t packet_type, uint16_t channel_nr, ui UNUSED(channel_nr); UNUSED(size); UNUSED(packet_type); - btstack_assert(packet_type = HCI_EVENT_PACKET); + btstack_assert(packet_type == HCI_EVENT_PACKET); if (hci_event_packet_get_type(packet) != SM_EVENT_PAIRING_COMPLETE) return; hci_con_handle_t con_handle = sm_event_pairing_complete_get_handle(packet); btstack_linked_list_iterator_t it;