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:
parent
9d59296130
commit
8d3d80571c
@ -1008,7 +1008,6 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
|
|||||||
uint16_t iso_packets;
|
uint16_t iso_packets;
|
||||||
uint16_t i;
|
uint16_t i;
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
uint8_t flags;
|
|
||||||
|
|
||||||
status = libusb20_tr_get_status(pxfer);
|
status = libusb20_tr_get_status(pxfer);
|
||||||
sxfer = libusb20_tr_get_priv_sc1(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);
|
iso_packets = libusb20_tr_get_max_frames(pxfer);
|
||||||
|
|
||||||
if (sxfer == NULL)
|
if (sxfer == NULL)
|
||||||
return; /* cancelled - nothing to do */
|
return; /* cancelled - nothing to do */
|
||||||
|
|
||||||
uxfer = (struct libusb_transfer *)(
|
uxfer = (struct libusb_transfer *)(
|
||||||
((uint8_t *)sxfer) + sizeof(*sxfer));
|
((uint8_t *)sxfer) + sizeof(*sxfer));
|
||||||
@ -1025,16 +1024,13 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
|
|||||||
iso_packets = uxfer->num_iso_packets;
|
iso_packets = uxfer->num_iso_packets;
|
||||||
|
|
||||||
if (iso_packets == 0)
|
if (iso_packets == 0)
|
||||||
return; /* nothing to do */
|
return; /* nothing to do */
|
||||||
|
|
||||||
/* make sure that the number of ISOCHRONOUS packets is valid */
|
/* make sure that the number of ISOCHRONOUS packets is valid */
|
||||||
uxfer->num_iso_packets = iso_packets;
|
uxfer->num_iso_packets = iso_packets;
|
||||||
|
|
||||||
flags = uxfer->flags;
|
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case LIBUSB20_TRANSFER_COMPLETED:
|
case LIBUSB20_TRANSFER_COMPLETED:
|
||||||
|
|
||||||
/* update actual length */
|
/* update actual length */
|
||||||
uxfer->actual_length = actlen;
|
uxfer->actual_length = actlen;
|
||||||
for (i = 0; i != iso_packets; i++) {
|
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);
|
libusb10_complete_transfer(pxfer, sxfer, LIBUSB_TRANSFER_COMPLETED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LIBUSB20_TRANSFER_START:
|
case LIBUSB20_TRANSFER_START:
|
||||||
|
|
||||||
/* setup length(s) */
|
/* setup length(s) */
|
||||||
actlen = 0;
|
actlen = 0;
|
||||||
for (i = 0; i != iso_packets; i++) {
|
for (i = 0; i != iso_packets; i++) {
|
||||||
@ -1064,7 +1058,6 @@ libusb10_isoc_proxy(struct libusb20_transfer *pxfer)
|
|||||||
/* fork another USB transfer, if any */
|
/* fork another USB transfer, if any */
|
||||||
libusb10_submit_transfer_sub(libusb20_tr_get_priv_sc0(pxfer), uxfer->endpoint);
|
libusb10_submit_transfer_sub(libusb20_tr_get_priv_sc0(pxfer), uxfer->endpoint);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
libusb10_complete_transfer(pxfer, sxfer, libusb10_convert_error(status));
|
libusb10_complete_transfer(pxfer, sxfer, libusb10_convert_error(status));
|
||||||
break;
|
break;
|
||||||
|
@ -517,9 +517,7 @@ libusb20_me_encode(void *ptr, uint16_t len, const void *pd)
|
|||||||
* room for the
|
* room for the
|
||||||
* complete structure:
|
* complete structure:
|
||||||
*/
|
*/
|
||||||
uint16_t dummy;
|
(void) libusb20_me_encode(buf,
|
||||||
|
|
||||||
dummy = libusb20_me_encode(buf,
|
|
||||||
0xFFFF - 3, ps->ptr);
|
0xFFFF - 3, ps->ptr);
|
||||||
} else {
|
} else {
|
||||||
bcopy(src_ptr, buf, src_len);
|
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 */
|
~(LIBUSB20_ME_STRUCT_ALIGN - 1)); /* align */
|
||||||
while (pd_count--) {
|
while (pd_count--) {
|
||||||
uint16_t temp;
|
uint16_t temp;
|
||||||
uint16_t dummy;
|
|
||||||
struct libusb20_me_struct *ps;
|
struct libusb20_me_struct *ps;
|
||||||
|
|
||||||
ps = LIBUSB20_ADD_BYTES(pd, pd_offset);
|
ps = LIBUSB20_ADD_BYTES(pd, pd_offset);
|
||||||
@ -763,7 +760,7 @@ libusb20_me_decode(const void *ptr, uint16_t len, void *pd)
|
|||||||
* Recursivly decode
|
* Recursivly decode
|
||||||
* the next structure
|
* the next structure
|
||||||
*/
|
*/
|
||||||
dummy = libusb20_me_decode(buf,
|
(void) libusb20_me_decode(buf,
|
||||||
temp, ps->ptr);
|
temp, ps->ptr);
|
||||||
} else {
|
} else {
|
||||||
/* update type */
|
/* update type */
|
||||||
|
Loading…
Reference in New Issue
Block a user