diff options
| author | Ha Thach <[email protected]> | 2022-05-26 23:54:20 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-26 23:54:20 +0700 |
| commit | 7b1344fe69d0cd569f182e0f24c2427afd16a9ec (patch) | |
| tree | 10791bc3befe30ebcc8f4db0b56ecef4e6fb56ad /src | |
| parent | c1ae13b997825300235b3b77b6b87008a3db5177 (diff) | |
| parent | 26c4d4b328ca93d0db5d8d7842a315cbde4d9f5a (diff) | |
Merge pull request #1467 from kilograham/rp2040_cleanup
Minor cleanup of RP2040 code post addition of Pico-PIO-USB
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/raspberrypi/rp2040/hcd_rp2040.c | 4 | ||||
| -rw-r--r-- | src/portable/raspberrypi/rp2040/rp2040_usb.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/portable/raspberrypi/rp2040/hcd_rp2040.c b/src/portable/raspberrypi/rp2040/hcd_rp2040.c index 5164035aa..54c27ffe3 100644 --- a/src/portable/raspberrypi/rp2040/hcd_rp2040.c +++ b/src/portable/raspberrypi/rp2040/hcd_rp2040.c @@ -537,7 +537,11 @@ bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet (void) rhport; // Copy data into setup packet buffer +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" memcpy((void*)&usbh_dpram->setup_packet[0], setup_packet, 8); +#pragma GCC diagnostic pop // Configure EP0 struct with setup info for the trans complete struct hw_endpoint *ep = _hw_endpoint_allocate(0); diff --git a/src/portable/raspberrypi/rp2040/rp2040_usb.c b/src/portable/raspberrypi/rp2040/rp2040_usb.c index 9c3e5d011..c93199fd0 100644 --- a/src/portable/raspberrypi/rp2040/rp2040_usb.c +++ b/src/portable/raspberrypi/rp2040/rp2040_usb.c @@ -58,9 +58,9 @@ void rp2040_usb_init(void) unreset_block_wait(RESETS_RESET_USBCTRL_BITS); // Clear any previous state just in case - // TODO Suppress warning array-bounds with gcc11 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wstringop-overflow" memset(usb_hw, 0, sizeof(*usb_hw)); memset(usb_dpram, 0, sizeof(*usb_dpram)); #pragma GCC diagnostic pop |
