From 47fabe42edaae4a5da6aa0d48c664a9184578753 Mon Sep 17 00:00:00 2001
From: Scott Shawcroft <scott@tannewt.org>
Date: Fri, 23 Nov 2018 12:48:55 -0800
Subject: [PATCH] One tweak to make -Wdiscarded-qualifiers happy.

---
 src/class/hid/hid_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index f1ecec3c7..c89c15acc 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -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