gatt-service: fix unused warning

This commit is contained in:
Matthias Ringwald 2021-06-25 09:28:45 +02:00
parent 0e109a1689
commit 4ddcd9eabe
2 changed files with 7 additions and 3 deletions

View File

@ -179,6 +179,8 @@ static void ancs_chunk_parser_handle_byte(uint8_t data){
}
static void ancs_client_handle_notification(uint8_t * packet, uint16_t size){
UNUSED(size);
uint16_t value_handle = little_endian_read_16(packet, 4);
uint16_t value_length = little_endian_read_16(packet, 6);
uint8_t * value = &packet[8];
@ -208,6 +210,9 @@ static void ancs_client_handle_notification(uint8_t * packet, uint16_t size){
static void ancs_client_handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
UNUSED(packet_type);
UNUSED(channel);
static const uint8_t ancs_notification_source_uuid[] = {0x9F,0xBF,0x12,0x0D,0x63,0x01,0x42,0xD9,0x8C,0x58,0x25,0xE6,0x99,0xA2,0x1D,0xBD};
static const uint8_t ancs_control_point_uuid[] = {0x69,0xD1,0xD8,0xF3,0x45,0xE1,0x49,0xA8,0x98,0x21,0x9B,0xBD,0xFD,0xAA,0xD9,0xD9};
static const uint8_t ancs_data_source_uuid[] = {0x22,0xEA,0xC6,0xE9,0x24,0xD6,0x4B,0xB5,0xBE,0x44,0xB3,0x6A,0xCE,0x7C,0x7B,0xFB};

View File

@ -327,8 +327,7 @@ static void battery_service_client_validate_service(battery_service_client_t * c
}
// @return true if client valid / run function should be called
static bool battery_service_client_handle_query_complete(battery_service_client_t * client, uint8_t * packet, uint16_t size){
uint8_t status = gatt_event_query_complete_get_att_status(packet);
static bool battery_service_client_handle_query_complete(battery_service_client_t * client, uint8_t status){
switch (client->state){
case BATTERY_SERVICE_CLIENT_STATE_W4_SERVICE_RESULT:
if (status != ATT_ERROR_SUCCESS){
@ -539,7 +538,7 @@ static void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint
case GATT_EVENT_QUERY_COMPLETE:
client = battery_service_get_client_for_con_handle(gatt_event_query_complete_get_handle(packet));
btstack_assert(client != NULL);
call_run = battery_service_client_handle_query_complete(client, packet, size);
call_run = battery_service_client_handle_query_complete(client, gatt_event_query_complete_get_att_status(packet));
break;
default: