mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 19:20:51 +00:00
Fix warnings
This commit is contained in:
parent
2a59ace6cd
commit
9e6ecc42e2
@ -624,12 +624,9 @@ static void avrcp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t
|
||||
static void avrcp_controller_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||
UNUSED(channel);
|
||||
UNUSED(size);
|
||||
uint8_t status = 0xFF;
|
||||
|
||||
if (packet_type != HCI_EVENT_PACKET) return;
|
||||
if (hci_event_packet_get_type(packet) != HCI_EVENT_AVRCP_META) return;
|
||||
|
||||
status = packet[5];
|
||||
if (!avrcp_cid) return;
|
||||
|
||||
memset(avrcp_subevent_value, 0, sizeof(avrcp_subevent_value));
|
||||
@ -714,9 +711,7 @@ static void avrcp_controller_packet_handler(uint8_t packet_type, uint16_t channe
|
||||
printf("AVRCP Controller: Set Player App Value %s\n", avrcp_ctype2str(avrcp_subevent_player_application_value_response_get_command_type(packet)));
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
printf("AVRCP Controller: Event 0x%02x is not parsed\n", packet[2]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -833,12 +833,9 @@ static void avrcp_target_packet_handler(uint8_t packet_type, uint16_t channel, u
|
||||
static void avrcp_controller_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||
UNUSED(channel);
|
||||
UNUSED(size);
|
||||
uint8_t status = 0xFF;
|
||||
|
||||
if (packet_type != HCI_EVENT_PACKET) return;
|
||||
if (hci_event_packet_get_type(packet) != HCI_EVENT_AVRCP_META) return;
|
||||
|
||||
status = packet[5];
|
||||
if (!media_tracker.avrcp_cid) return;
|
||||
|
||||
switch (packet[2]){
|
||||
|
@ -248,7 +248,8 @@ static void btstack_run_loop_posix_set_timer(btstack_timer_source_t *a, uint32_t
|
||||
static void btstack_run_loop_posix_trigger_pipe(int fd){
|
||||
if (fd < 0) return;
|
||||
const uint8_t x = (uint8_t) 'x';
|
||||
(void) write(fd, &x, 1);
|
||||
ssize_t bytes_written = write(fd, &x, 1);
|
||||
UNUSED(bytes_written);
|
||||
}
|
||||
|
||||
// poll data sources from irq
|
||||
@ -256,7 +257,8 @@ static void btstack_run_loop_posix_trigger_pipe(int fd){
|
||||
static void btstack_run_loop_posix_poll_data_sources_handler(btstack_data_source_t * ds, btstack_data_source_callback_type_t callback_type){
|
||||
UNUSED(callback_type);
|
||||
uint8_t buffer[1];
|
||||
(void) read(ds->source.fd, buffer, 1);
|
||||
ssize_t bytes_read = read(ds->source.fd, buffer, 1);
|
||||
UNUSED(bytes_read);
|
||||
// poll data sources
|
||||
btstack_run_loop_base_poll_data_sources();
|
||||
}
|
||||
@ -271,7 +273,8 @@ static void btstack_run_loop_posix_poll_data_sources_from_irq(void){
|
||||
static void btstack_run_loop_posix_process_callbacks_handler(btstack_data_source_t * ds, btstack_data_source_callback_type_t callback_type){
|
||||
UNUSED(callback_type);
|
||||
uint8_t buffer[1];
|
||||
(void) read(ds->source.fd, buffer, 1);
|
||||
ssize_t bytes_read = read(ds->source.fd, buffer, 1);
|
||||
UNUSED(bytes_read);
|
||||
// execute callbacks - protect list with mutex
|
||||
while (1){
|
||||
pthread_mutex_lock(&btstack_run_loop_posix_callbacks_mutex);
|
||||
|
@ -37,6 +37,9 @@
|
||||
|
||||
#define BTSTACK_FILE__ "btstack_signal.c"
|
||||
|
||||
// enable System V signal API
|
||||
#define _POSIX_C_SOURCE 200809
|
||||
|
||||
#include "btstack_signal.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
@ -73,7 +73,8 @@ static char log_message_buffer[256];
|
||||
static void hci_dump_posix_fs_reset(void){
|
||||
btstack_assert(dump_file >= 0);
|
||||
(void) lseek(dump_file, 0, SEEK_SET);
|
||||
(void) ftruncate(dump_file, 0);
|
||||
int err = ftruncate(dump_file, 0);
|
||||
UNUSED(err);
|
||||
}
|
||||
|
||||
static void hci_dump_posix_fs_log_packet(uint8_t packet_type, uint8_t in, uint8_t *packet, uint16_t len) {
|
||||
@ -117,8 +118,11 @@ static void hci_dump_posix_fs_log_packet(uint8_t packet_type, uint8_t in, uint8_
|
||||
return;
|
||||
}
|
||||
|
||||
(void) write(dump_file, &header, header_len);
|
||||
(void) write(dump_file, packet, len );
|
||||
ssize_t bytes_written;
|
||||
bytes_written = write(dump_file, &header, header_len);
|
||||
UNUSED(bytes_written);
|
||||
bytes_written = write(dump_file, packet, len );
|
||||
UNUSED(bytes_written);
|
||||
}
|
||||
|
||||
static void hci_dump_posix_fs_log_message(const char * format, va_list argptr){
|
||||
@ -152,7 +156,8 @@ int hci_dump_posix_fs_open(const char *filename, hci_dump_format_t format){
|
||||
// Datalink Type: 1001 - Un-encapsulated HCI
|
||||
0x00, 0x00, 0x03, 0xE9,
|
||||
};
|
||||
(void) write(dump_file, &file_header, sizeof(file_header));
|
||||
ssize_t bytes_written = write(dump_file, &file_header, sizeof(file_header));
|
||||
UNUSED(bytes_written);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -511,7 +511,6 @@ extern const hci_cmd_t hci_le_set_default_periodic_advertising_sync_transfer_par
|
||||
extern const hci_cmd_t hci_le_set_default_phy;
|
||||
extern const hci_cmd_t hci_le_set_event_mask;
|
||||
extern const hci_cmd_t hci_le_set_extended_advertising_data;
|
||||
extern const hci_cmd_t hci_le_set_extended_advertising_data;
|
||||
extern const hci_cmd_t hci_le_set_extended_advertising_enable;
|
||||
extern const hci_cmd_t hci_le_set_extended_advertising_parameters;
|
||||
extern const hci_cmd_t hci_le_set_extended_scan_enable;
|
||||
|
@ -339,7 +339,6 @@ static mesh_network_pdu_t * encrypted_proxy_configuration_ready_to_send;
|
||||
// Used to answer configuration request
|
||||
static uint16_t proxy_configuration_filter_list_len;
|
||||
static mesh_proxy_configuration_filter_type_t proxy_configuration_filter_type;
|
||||
static uint16_t primary_element_address;
|
||||
|
||||
static void request_can_send_now_proxy_configuration_callback_handler(mesh_network_pdu_t * network_pdu){
|
||||
encrypted_proxy_configuration_ready_to_send = network_pdu;
|
||||
|
@ -91,6 +91,7 @@ static uint8_t prov_start_authentication_method;
|
||||
static uint8_t prov_start_authentication_action;
|
||||
static uint8_t prov_start_authentication_size;
|
||||
static uint8_t prov_authentication_string;
|
||||
// ConfirmationInputs = ProvisioningInvitePDUValue || ProvisioningCapabilitiesPDUValue || ProvisioningStartPDUValue || PublicKeyProvisioner || PublicKeyDevice
|
||||
static uint8_t prov_confirmation_inputs[1 + 11 + 5 + 64 + 64];
|
||||
static uint8_t confirmation_provisioner[16];
|
||||
static uint8_t random_provisioner[16];
|
||||
@ -99,8 +100,6 @@ static uint8_t remote_ec_q[64];
|
||||
static uint8_t dhkey[32];
|
||||
static uint8_t confirmation_salt[16];
|
||||
static uint8_t confirmation_key[16];
|
||||
// ConfirmationInputs = ProvisioningInvitePDUValue || ProvisioningCapabilitiesPDUValue || ProvisioningStartPDUValue || PublicKeyProvisioner || PublicKeyDevice
|
||||
static uint8_t prov_confirmation_inputs[1 + 11 + 5 + 64 + 64];
|
||||
static uint8_t provisioning_salt[16];
|
||||
static uint8_t session_key[16];
|
||||
static uint8_t session_nonce[16];
|
||||
|
Loading…
x
Reference in New Issue
Block a user