Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb In preparation for building this as a module, cl...



details:   https://anonhg.NetBSD.org/src/rev/bebfd4043dc6
branches:  trunk
changeset: 768630:bebfd4043dc6
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Aug 23 12:33:50 2011 +0000

description:
In preparation for building this as a module, clean-up some gcc
-Wsign-compare issues so it will build with WARNS=4

diffstat:

 sys/dev/usb/if_rum.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 103271f77d3a -r bebfd4043dc6 sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c      Tue Aug 23 12:27:01 2011 +0000
+++ b/sys/dev/usb/if_rum.c      Tue Aug 23 12:33:50 2011 +0000
@@ -1,5 +1,5 @@
 /*     $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $      */
-/*     $NetBSD: if_rum.c,v 1.36 2011/02/22 00:58:08 jmcneill Exp $     */
+/*     $NetBSD: if_rum.c,v 1.37 2011/08/23 12:33:50 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.36 2011/02/22 00:58:08 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.37 2011/08/23 12:33:50 pgoyette Exp $");
 
 
 #include <sys/param.h>
@@ -843,7 +843,8 @@
 
        usbd_get_xfer_status(xfer, NULL, NULL, &len, NULL);
 
-       if (len < RT2573_RX_DESC_SIZE + sizeof (struct ieee80211_frame_min)) {
+       if (len < (int)(RT2573_RX_DESC_SIZE +
+                       sizeof(struct ieee80211_frame_min))) {
                DPRINTF(("%s: xfer too short %d\n", device_xname(sc->sc_dev),
                    len));
                ifp->if_ierrors++;
@@ -1303,7 +1304,7 @@
                                break;
                        }
                        IFQ_DEQUEUE(&ifp->if_snd, m0);
-                       if (m0->m_len < sizeof(struct ether_header) &&
+                       if (m0->m_len < (int)sizeof(struct ether_header) &&
                            !(m0 = m_pullup(m0, sizeof(struct ether_header))))
                                continue;
 
@@ -1929,7 +1930,7 @@
 rum_bbp_init(struct rum_softc *sc)
 {
 #define N(a)   (sizeof (a) / sizeof ((a)[0]))
-       int i, ntries;
+       unsigned int i, ntries;
        uint8_t val;
 
        /* wait for BBP to be ready */
@@ -1969,7 +1970,7 @@
        struct rum_rx_data *data;
        uint32_t tmp;
        usbd_status error = 0;
-       int i, ntries;
+       unsigned int i, ntries;
 
        if ((sc->sc_flags & RT2573_FWLOADED) == 0) {
                if (rum_attachhook(sc))



Home | Main Index | Thread Index | Old Index