Remove unused variables to silence CLANG warnings.

Remove some BLANK lines and unnecessary TABS.

Differential Revision:	D2687
Reviewed by:		rodrigc, hselasky
This commit is contained in:
araujo 2015-06-24 01:34:35 +00:00
parent 9d59296130
commit 8d3d80571c
2 changed files with 4 additions and 14 deletions

View File

@ -1008,7 +1008,6 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
uint16_t iso_packets;
uint16_t i;
uint8_t status;
uint8_t flags;
status = libusb20_tr_get_status(pxfer);
sxfer = libusb20_tr_get_priv_sc1(pxfer);
@ -1016,7 +1015,7 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
iso_packets = libusb20_tr_get_max_frames(pxfer);
if (sxfer == NULL)
return; /* cancelled - nothing to do */
return; /* cancelled - nothing to do */
uxfer = (struct libusb_transfer *)(
((uint8_t *)sxfer) + sizeof(*sxfer));
@ -1025,16 +1024,13 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
iso_packets = uxfer->num_iso_packets;
if (iso_packets == 0)
return; /* nothing to do */
return; /* nothing to do */
/* make sure that the number of ISOCHRONOUS packets is valid */
uxfer->num_iso_packets = iso_packets;
flags = uxfer->flags;
switch (status) {
case LIBUSB20_TRANSFER_COMPLETED:
/* update actual length */
uxfer->actual_length = actlen;
for (i = 0; i != iso_packets; i++) {
@ -1043,9 +1039,7 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
}
libusb10_complete_transfer(pxfer, sxfer, LIBUSB_TRANSFER_COMPLETED);
break;
case LIBUSB20_TRANSFER_START:
/* setup length(s) */
actlen = 0;
for (i = 0; i != iso_packets; i++) {
@ -1064,7 +1058,6 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
/* fork another USB transfer, if any */
libusb10_submit_transfer_sub(libusb20_tr_get_priv_sc0(pxfer), uxfer->endpoint);
break;
default:
libusb10_complete_transfer(pxfer, sxfer, libusb10_convert_error(status));
break;

View File

@ -517,9 +517,7 @@ libusb20_me_encode(void *ptr, uint16_t len, const void *pd)
* room for the
* complete structure:
*/
uint16_t dummy;
dummy = libusb20_me_encode(buf,
(void) libusb20_me_encode(buf,
0xFFFF - 3, ps->ptr);
} else {
bcopy(src_ptr, buf, src_len);
@ -673,7 +671,6 @@ libusb20_me_decode(const void *ptr, uint16_t len, void *pd)
~(LIBUSB20_ME_STRUCT_ALIGN - 1)); /* align */
while (pd_count--) {
uint16_t temp;
uint16_t dummy;
struct libusb20_me_struct *ps;
ps = LIBUSB20_ADD_BYTES(pd, pd_offset);
@ -763,7 +760,7 @@ libusb20_me_decode(const void *ptr, uint16_t len, void *pd)
* Recursivly decode
* the next structure
*/
dummy = libusb20_me_decode(buf,
(void) libusb20_me_decode(buf,
temp, ps->ptr);
} else {
/* update type */