Author: araujo (ports committer)
Date: Wed Jun 24 01:34:35 2015
New Revision: 284744
URL: https://svnweb.freebsd.org/changeset/base/284744

Log:
  Remove unused variables to silence CLANG warnings.
  Remove some BLANK lines and unnecessary TABS.
  
  Differential Revision:        D2687
  Reviewed by:          rodrigc, hselasky

Modified:
  head/lib/libusb/libusb10.c
  head/lib/libusb/libusb20_desc.c

Modified: head/lib/libusb/libusb10.c
==============================================================================
--- head/lib/libusb/libusb10.c  Tue Jun 23 22:40:22 2015        (r284743)
+++ head/lib/libusb/libusb10.c  Wed Jun 24 01:34:35 2015        (r284744)
@@ -1008,7 +1008,6 @@ libusb10_isoc_proxy(struct libusb20_tran
        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_tran
        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_tran
                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_tran
                }
                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_tran
                /* 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;

Modified: head/lib/libusb/libusb20_desc.c
==============================================================================
--- head/lib/libusb/libusb20_desc.c     Tue Jun 23 22:40:22 2015        
(r284743)
+++ head/lib/libusb/libusb20_desc.c     Wed Jun 24 01:34:35 2015        
(r284744)
@@ -517,9 +517,7 @@ libusb20_me_encode(void *ptr, uint16_t l
                                                 * 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, uint
                            ~(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, uint
                                                 * Recursivly decode
                                                 * the next structure
                                                 */
-                                               dummy = libusb20_me_decode(buf,
+                                               (void) libusb20_me_decode(buf,
                                                    temp, ps->ptr);
                                        } else {
                                                /* update type */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to