diff options
| author | Ben Avison <[email protected]> | 2022-09-05 12:53:49 +0100 |
|---|---|---|
| committer | Ben Avison <[email protected]> | 2022-09-13 18:00:50 +0100 |
| commit | 65ba15c37d50fa470fa24c38dbf0e30eba3147c0 (patch) | |
| tree | 0a256668b5f4e70d9a1d5669d41027ed3c4ba9d0 /src/portable/raspberrypi | |
| parent | 16518dcbbb6f20182a6f69556908afe35a7f6e25 (diff) | |
Remove unreachable code
IAR generates warning Pe111 'statement is unreachable'. In a couple of
cases, replace return statements with TU_ATTR_FALLTHROUGH; because some
compilers apparently can't figure out that the return statements are
unreachable but do whinge about an imagined fall-through without them!
Diffstat (limited to 'src/portable/raspberrypi')
| -rw-r--r-- | src/portable/raspberrypi/rp2040/hcd_rp2040.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/portable/raspberrypi/rp2040/hcd_rp2040.c b/src/portable/raspberrypi/rp2040/hcd_rp2040.c index 5badb261a..f65749a2f 100644 --- a/src/portable/raspberrypi/rp2040/hcd_rp2040.c +++ b/src/portable/raspberrypi/rp2040/hcd_rp2040.c @@ -432,8 +432,7 @@ tusb_speed_t hcd_port_speed_get(uint8_t rhport) case 2: return TUSB_SPEED_FULL; default: - panic("Invalid speed\n"); - return TUSB_SPEED_INVALID; + panic("Invalid speed\n"); // does not return } } @@ -599,8 +598,7 @@ bool hcd_edpt_clear_stall(uint8_t dev_addr, uint8_t ep_addr) (void) dev_addr; (void) ep_addr; - panic("hcd_clear_stall"); - return true; + panic("hcd_clear_stall"); // does not return } #endif |
