I'm using Lint for the first time and it's telling me the following:
parameter 'p_h_attr' of function
'get_dev_info_service_id_attr(ble_attribute_t *)' could be const
For this function:
static void get_dev_info_service_id_attr(ble_attribute_t *p_h_attr)
{
p_h_attr->p_attr = (void *)ble_char_system_id_value;
p_h_attr->attr_len = sizeof(ble_char_system_id_value);
}
However, of course, the compiler complains if I make p_h_attr a const because I'm writing into the passed pointer to the structure.
How can I solve this issue?