VDrift / vdrift

VDrift source code
http://vdrift.net/
GNU General Public License v3.0
353 stars 97 forks source link

Fix incorrect command size sent over USB #171

Closed Lastique closed 5 years ago

Lastique commented 5 years ago

In particular, this fixes gcc warning:

G25manage.c: In function ‘G25send_command’:
G25manage.c:146:58: warning: ‘sizeof’ on array function parameter ‘command’ will return size of ‘char *’ [-Wsizeof-array-argument]
  146 |   stat=usb_interrupt_write(usb_handle, 1, command, sizeof(command), 100);
      |                                                          ^
G25manage.c:123:26: note: declared here
  123 | int G25send_command(char command[7]) {
      |                     ~~~~~^~~~~~~~~~