USBHost: Silence unused variable warnings.

I removed the initialization of some variables which were never used to
silence GCC warnings.

One of them had me removing the following line from
USBHostMouse::rxHandler():
    int len = int_in->getLengthTransferred();
The variable len is never used again in this method and it doesn't
appear that the int_in->getLengthTransferred() call has any side
effects which would require this extraneous call to remain in the code.
pull/67/head
Adam Green 2013-08-29 21:07:43 -07:00
parent ddb3fbe826
commit 8281836df3
2 changed files with 4 additions and 5 deletions

View File

@ -82,7 +82,6 @@ bool USBHostMouse::connect() {
void USBHostMouse::rxHandler() {
int len_listen = int_in->getSize();
int len = int_in->getLengthTransferred();
if (onUpdate) {
(*onUpdate)(report[0] & 0x07, report[1], report[2], report[3]);

View File

@ -131,10 +131,10 @@ void USBHostSerial::format(int bits, Parity parity, int stop_bits) {
line_coding.stop_bits = (stop_bits == 1) ? 0 : 2;
// set line coding
int res = host->controlWrite( dev,
USB_RECIPIENT_INTERFACE | USB_HOST_TO_DEVICE | USB_REQUEST_TYPE_CLASS,
SET_LINE_CODING,
0, serial_intf, (uint8_t *)&line_coding, 7);
host->controlWrite( dev,
USB_RECIPIENT_INTERFACE | USB_HOST_TO_DEVICE | USB_REQUEST_TYPE_CLASS,
SET_LINE_CODING,
0, serial_intf, (uint8_t *)&line_coding, 7);
}
int USBHostSerial::_getc() {