One tweak to make -Wdiscarded-qualifiers happy.

This commit is contained in:
Scott Shawcroft 2018-11-23 12:48:55 -08:00
parent bf8c4612dc
commit 47fabe42ed
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59
1 changed files with 2 additions and 1 deletions

View File

@ -418,7 +418,8 @@ bool hidd_control_request(uint8_t rhport, tusb_control_request_t const * p_reque
if (p_request->bRequest == TUSB_REQ_GET_DESCRIPTOR && desc_type == HID_DESC_TYPE_REPORT)
{
usbd_control_xfer(rhport, p_request, p_hid->desc_report, p_hid->desc_len);
// Cast away the const on p_hid->desc_report because we know it won't be modified.
usbd_control_xfer(rhport, p_request, (void *)p_hid->desc_report, p_hid->desc_len);
}else
{
return false; // stall unsupported request