mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-30 15:32:41 +00:00
avrcp: fix warnings
This commit is contained in:
parent
5f5e54377c
commit
4c7a1d3ad3
@ -375,7 +375,7 @@ uint16_t avdtp_unpack_service_capabilities(avdtp_connection_t * connection, avdt
|
||||
caps->media_codec.media_type = (avdtp_media_type_t)(data[pos++] >> 4);
|
||||
caps->media_codec.media_codec_type = (avdtp_media_codec_type_t)(data[pos++]);
|
||||
caps->media_codec.media_codec_information_len = cap_len - 2;
|
||||
caps->media_codec.media_codec_information = &data[pos];
|
||||
caps->media_codec.media_codec_information = &data[pos++];
|
||||
break;
|
||||
case AVDTP_MEDIA_TRANSPORT:
|
||||
case AVDTP_REPORTING:
|
||||
|
@ -142,7 +142,9 @@ static const char * avrcp_media_attribute_id_name[] = {
|
||||
"NONE", "TITLE", "ARTIST", "ALBUM", "TRACK", "TOTAL TRACKS", "GENRE", "SONG LENGTH"
|
||||
};
|
||||
const char * avrcp_attribute2str(uint8_t index){
|
||||
if ((index >= 1) && (index <= 7)) return avrcp_media_attribute_id_name[index];
|
||||
if (index > 7){
|
||||
index = 0;
|
||||
}
|
||||
return avrcp_media_attribute_id_name[0];
|
||||
}
|
||||
|
||||
@ -151,8 +153,8 @@ static const char * avrcp_play_status_name[] = {
|
||||
"ERROR" // 0xFF
|
||||
};
|
||||
const char * avrcp_play_status2str(uint8_t index){
|
||||
if (index > 4) {
|
||||
return avrcp_play_status_name[5];
|
||||
if (index > 4){
|
||||
index = 5;
|
||||
}
|
||||
return avrcp_play_status_name[index];
|
||||
}
|
||||
@ -1188,4 +1190,4 @@ void avrcp_init_fuzz(void){
|
||||
void avrcp_packet_handler_fuzz(uint8_t *packet, uint16_t size){
|
||||
avrcp_packet_handler(L2CAP_DATA_PACKET, FUZZ_CID, packet, size);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user