example: fix warning for unused argc, argv

This commit is contained in:
Matthias Ringwald 2017-05-22 22:04:20 +02:00
parent 664a636e99
commit 6316c8ed51
6 changed files with 10 additions and 9 deletions

View File

@ -132,7 +132,7 @@ static void ancs_callback(uint8_t packet_type, uint16_t channel, uint8_t *packet
int btstack_main(int argc, const char * argv[]); int btstack_main(int argc, const char * argv[]);
int btstack_main(int argc, const char * argv[]){ int btstack_main(int argc, const char * argv[]){
UNUSED(argc); (void)argc;
(void)argv; (void)argv;
printf("BTstack ANCS Client starting up...\n"); printf("BTstack ANCS Client starting up...\n");

View File

@ -333,8 +333,8 @@ int btstack_main(int argc, const char * argv[]){
return 0; return 0;
} }
#else #else
UNUSED(argc); (void)argc;
UNUSED(argv); (void)argv;
#endif #endif
hci_event_callback_registration.callback = &hci_event_handler; hci_event_callback_registration.callback = &hci_event_handler;

View File

@ -293,8 +293,8 @@ int btstack_main(int argc, const char * argv[]){
return 0; return 0;
} }
#else #else
UNUSED(argc); (void)argc;
UNUSED(argv); (void)argv;
#endif #endif
// setup ATT server - only needed if LE Peripheral does ATT queries on its own, e.g. Android phones // setup ATT server - only needed if LE Peripheral does ATT queries on its own, e.g. Android phones

View File

@ -185,6 +185,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
break; break;
case ATT_EVENT_MTU_EXCHANGE_COMPLETE: case ATT_EVENT_MTU_EXCHANGE_COMPLETE:
mtu = att_event_mtu_exchange_complete_get_MTU(packet) - 3; mtu = att_event_mtu_exchange_complete_get_MTU(packet) - 3;
mtu = 27;
printf("ATT MTU = %u\n", mtu); printf("ATT MTU = %u\n", mtu);
test_data_len = mtu - 3; test_data_len = mtu - 3;
if (test_data_len > sizeof(test_data)){ if (test_data_len > sizeof(test_data)){

View File

@ -264,8 +264,8 @@ int btstack_main(int argc, const char * argv[]){
return 0; return 0;
} }
#else #else
UNUSED(argc); (void)argc;
UNUSED(argv); (void)argv;
#endif #endif
hci_event_callback_registration.callback = &hci_event_handler; hci_event_callback_registration.callback = &hci_event_handler;

View File

@ -563,8 +563,8 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
int btstack_main(int argc, const char * argv[]); int btstack_main(int argc, const char * argv[]);
int btstack_main(int argc, const char * argv[]){ int btstack_main(int argc, const char * argv[]){
UNUSED(argc); (void)argc;
(void)(argv); (void)argv;
printf("Client HCI init done\n"); printf("Client HCI init done\n");