in the descriptr 0x48 the returned parameter is different, one is "const" one is not.
static inline const uint8_t *desc48_get_provider(const uint8_t *p_desc,
uint8_t *pi_length)
{
const uint8_t *p = p_desc + DESC48_HEADER_SIZE;
*pi_length = p[0];
return p + 1;
}
static inline uint8_t *desc48_get_service(const uint8_t *p_desc,
uint8_t *pi_length)
{
uint8_t *p = (uint8_t *)p_desc + DESC48_HEADER_SIZE + 1 + p_desc[3];
*pi_length = p[0];
return p + 1;
}
The first one generate "warning", in my opinion, the structure of "desc48_get_service" is more correct and can also be used for "desc48_get_provider"
static inline uint8_t *desc48_get_provider(const uint8_t *p_desc,
uint8_t *pi_length)
{
uint8_t *p = (uint8_t *)p_desc + DESC48_HEADER_SIZE;
*pi_length = p[0];
return p + 1;
}