mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-01 10:20:38 +00:00
use forloop to avoid -Warray-bounds with host setup packet
This commit is contained in:
parent
9c56f70111
commit
25580b4fe9
@ -563,11 +563,10 @@ bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet
|
|||||||
(void) rhport;
|
(void) rhport;
|
||||||
|
|
||||||
// Copy data into setup packet buffer
|
// Copy data into setup packet buffer
|
||||||
#pragma GCC diagnostic push
|
for(uint8_t i=0; i<8; i++)
|
||||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
{
|
||||||
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
usbh_dpram->setup_packet[i] = setup_packet[i];
|
||||||
memcpy((void*) (uintptr_t) &usbh_dpram->setup_packet[0], setup_packet, 8);
|
}
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
|
||||||
// Configure EP0 struct with setup info for the trans complete
|
// Configure EP0 struct with setup info for the trans complete
|
||||||
struct hw_endpoint *ep = _hw_endpoint_allocate(0);
|
struct hw_endpoint *ep = _hw_endpoint_allocate(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user