Commit 9890731
authored
Use only unsigned value for array access
GCC catches this bug.
```
...\libraries\Adafruit_TinyUSB_Library\src\Adafruit_USBD_HID.cpp:
Line 181 Char 22
In member function 'bool Adafruit_USBD_HID::keyboardPress(uint8_t, char)':
warning: array subscript has type 'char' [-Wchar-subscripts]
181 | if (_ascii2keycode[ch][0])
| ^~
...\libraries\Adafruit_TinyUSB_Library\src\Adafruit_USBD_HID.cpp:
Line 183 Char 31
warning: array subscript has type 'char' [-Wchar-subscripts]
183 | keycode[0] = _ascii2keycode[ch][1];
| ^~
```1 parent 1ea58a1 commit 9890731
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
180 | 181 | | |
181 | | - | |
| 182 | + | |
182 | 183 | | |
183 | | - | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
0 commit comments