mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 19:20:51 +00:00
fix warnings for log_info/printf
This commit is contained in:
parent
c15d10d569
commit
e883851f1d
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user