fix format warnings for uint32_t values

This commit is contained in:
Matthias Ringwald 2017-05-02 16:17:33 +02:00
parent 5c5f3f76da
commit bace42effc
4 changed files with 9 additions and 6 deletions

View File

@ -166,11 +166,11 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
sm_just_works_confirm(sm_event_just_works_request_get_handle(packet));
break;
case SM_EVENT_NUMERIC_COMPARISON_REQUEST:
printf("Confirming numeric comparison: %u\n", sm_event_numeric_comparison_request_get_passkey(packet));
printf("Confirming numeric comparison: %"PRIu32"\n", sm_event_numeric_comparison_request_get_passkey(packet));
sm_numeric_comparison_confirm(sm_event_passkey_display_number_get_handle(packet));
break;
case SM_EVENT_PASSKEY_DISPLAY_NUMBER:
printf("Display Passkey: %u\n", sm_event_passkey_display_number_get_passkey(packet));
printf("Display Passkey: %"PRIu32"\n", sm_event_passkey_display_number_get_passkey(packet));
break;
case HCI_EVENT_LE_META:

View File

@ -50,6 +50,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "sm_pairing_peripheral.h"
#include "btstack.h"
@ -161,11 +162,11 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
sm_just_works_confirm(sm_event_just_works_request_get_handle(packet));
break;
case SM_EVENT_NUMERIC_COMPARISON_REQUEST:
printf("Confirming numeric comparison: %u\n", sm_event_numeric_comparison_request_get_passkey(packet));
printf("Confirming numeric comparison: %"PRIu32"\n", sm_event_numeric_comparison_request_get_passkey(packet));
sm_numeric_comparison_confirm(sm_event_passkey_display_number_get_handle(packet));
break;
case SM_EVENT_PASSKEY_DISPLAY_NUMBER:
printf("Display Passkey: %u\n", sm_event_passkey_display_number_get_passkey(packet));
printf("Display Passkey: %"PRIu32"\n", sm_event_passkey_display_number_get_passkey(packet));
break;
case SM_EVENT_IDENTITY_CREATED:
sm_event_identity_created_get_identity_address(packet, addr);

View File

@ -1253,7 +1253,7 @@ static void parse_sequence(hfp_connection_t * hfp_connection){
break;
case HFP_CMD_SUPPORTED_FEATURES:
hfp_connection->remote_supported_features = btstack_atoi((char*)hfp_connection->line_buffer);
log_info("Parsed supported feature %d\n", hfp_connection->remote_supported_features);
log_info("Parsed supported feature %d\n", (int) hfp_connection->remote_supported_features);
break;
case HFP_CMD_AVAILABLE_CODECS:
log_info("Parsed codec %s\n", hfp_connection->line_buffer);

View File

@ -45,6 +45,8 @@
* Created by Matthias Ringwald on 4/29/09.
*/
#include <inttypes.h>
#include "btstack_config.h"
#include "btstack_debug.h"
@ -155,7 +157,7 @@ static enum {
#endif
static int hci_transport_h4_set_baudrate(uint32_t baudrate){
log_info("hci_transport_h4_set_baudrate %u", baudrate);
log_info("hci_transport_h4_set_baudrate %"PRIu32, baudrate);
return btstack_uart->set_baudrate(baudrate);
}