summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2019-09-21 12:00:36 -0400
committerNathan Conrad <[email protected]>2019-09-21 12:00:52 -0400
commitb6590490a8e2ad3debac4508f65af001dc1753af (patch)
tree061404c6e146db5b5ddb50059e0c122bd57f0807
parentce9f133d258fe173211063b06c87c7c5d1384986 (diff)
USB Control: Pointer arithmetic on void* is forbiden
-rw-r--r--src/device/usbd_control.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device/usbd_control.c b/src/device/usbd_control.c
index 4ec432185..eecc95edb 100644
--- a/src/device/usbd_control.c
+++ b/src/device/usbd_control.c
@@ -122,7 +122,7 @@ bool usbd_control_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result
}
_control_state.total_transferred += xferred_bytes;
- _control_state.buffer += xferred_bytes;
+ _control_state.buffer = ((uint8_t*)_control_state.buffer) + xferred_bytes;
if ( _control_state.total_len == _control_state.total_transferred || xferred_bytes < CFG_TUD_ENDOINT0_SIZE )
{