Commit f5daff0
committed
Suppress Teensy 4 USB stack GCC warnings
There were two warnings from the Teensy 4 core updates:
/usr/local/share/arduino/hardware/teensy/avr/cores/teensy4/usb.c: In function 'endpoint0_complete':
/usr/local/share/arduino/hardware/teensy/avr/cores/teensy4/usb.c:766:10: warning: variable 'setup' set but not used [-Wunused-but-set-variable]
setup_t setup;
^
/usr/local/share/arduino/hardware/teensy/avr/cores/teensy4/usb.c: At top level:
/usr/local/share/arduino/hardware/teensy/avr/cores/teensy4/usb.c:98:16: warning: 'endpoint0_buffer' defined but not used [-Wunused-variable]
static uint8_t endpoint0_buffer[8];
Both of these are from not reading the endpoint 0 data in the `endpoint0_complete()` function. Reading and casting to `void` suppresses the warnings and should be optimized out by the compiler.1 parent c9d74b7 commit f5daff0
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
825 | 830 | | |
826 | 831 | | |
827 | 832 | | |
| |||
0 commit comments