Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Fix signed/unsigned comparison warnings.



details:   https://anonhg.NetBSD.org/src/rev/2a1f91b3252a
branches:  trunk
changeset: 539063:2a1f91b3252a
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Nov 07 07:46:39 2002 +0000

description:
Fix signed/unsigned comparison warnings.

diffstat:

 sys/dev/ic/i82557.c       |   6 +++---
 sys/dev/ic/rtl81x9.c      |   6 +++---
 sys/dev/ic/smc83c170.c    |  10 ++++++----
 sys/dev/ic/smc83c170var.h |   4 ++--
 4 files changed, 14 insertions(+), 12 deletions(-)

diffs (110 lines):

diff -r 94d69858b88b -r 2a1f91b3252a sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c       Thu Nov 07 07:45:03 2002 +0000
+++ b/sys/dev/ic/i82557.c       Thu Nov 07 07:46:39 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82557.c,v 1.67 2002/10/22 00:01:56 fair Exp $ */
+/*     $NetBSD: i82557.c,v 1.68 2002/11/07 07:46:39 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.67 2002/10/22 00:01:56 fair Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.68 2002/11/07 07:46:39 thorpej Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -2040,7 +2040,7 @@
 #define        UCODE(x)        x, sizeof(x)
 
 static const struct ucode {
-       uint32_t        revision;
+       int32_t         revision;
        const uint32_t  *ucode;
        size_t          length;
        uint16_t        int_delay_offset;
diff -r 94d69858b88b -r 2a1f91b3252a sys/dev/ic/rtl81x9.c
--- a/sys/dev/ic/rtl81x9.c      Thu Nov 07 07:45:03 2002 +0000
+++ b/sys/dev/ic/rtl81x9.c      Thu Nov 07 07:46:39 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl81x9.c,v 1.42 2002/10/22 00:01:56 fair Exp $        */
+/*     $NetBSD: rtl81x9.c,v 1.43 2002/11/07 07:51:10 thorpej Exp $     */
 
 /*
  * Copyright (c) 1997, 1998
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.42 2002/10/22 00:01:56 fair Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.43 2002/11/07 07:51:10 thorpej Exp $");
 
 #include "bpfilter.h"
 #include "rnd.h"
@@ -979,7 +979,7 @@
         struct mbuf            *m;
         struct ifnet           *ifp;
        caddr_t                 rxbufpos, dst;
-       int                     total_len, wrap = 0;
+       u_int                   total_len, wrap = 0;
        u_int32_t               rxstat;
        u_int16_t               cur_rx, new_rx;
        u_int16_t               limit;
diff -r 94d69858b88b -r 2a1f91b3252a sys/dev/ic/smc83c170.c
--- a/sys/dev/ic/smc83c170.c    Thu Nov 07 07:45:03 2002 +0000
+++ b/sys/dev/ic/smc83c170.c    Thu Nov 07 07:46:39 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smc83c170.c,v 1.50 2002/10/22 00:01:57 fair Exp $      */
+/*     $NetBSD: smc83c170.c,v 1.51 2002/11/07 07:48:35 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.50 2002/10/22 00:01:57 fair Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smc83c170.c,v 1.51 2002/11/07 07:48:35 thorpej Exp $");
 
 #include "bpfilter.h"
 
@@ -116,7 +116,8 @@
        bus_space_tag_t st = sc->sc_st;
        bus_space_handle_t sh = sc->sc_sh;
        struct ifnet *ifp = &sc->sc_ethercom.ec_if;
-       int i, rseg, error, miiflags;
+       int rseg, error, miiflags;
+       u_int i;
        bus_dma_segment_t seg;
        u_int8_t enaddr[ETHER_ADDR_LEN], devname[12 + 1];
        u_int16_t myea[ETHER_ADDR_LEN / 2], mydevname[6];
@@ -574,7 +575,8 @@
        struct epic_descsoft *ds;
        struct mbuf *m;
        u_int32_t intstat;
-       int i, len, claimed = 0;
+       int i, claimed = 0;
+       u_int len;
 
  top:
        /*
diff -r 94d69858b88b -r 2a1f91b3252a sys/dev/ic/smc83c170var.h
--- a/sys/dev/ic/smc83c170var.h Thu Nov 07 07:45:03 2002 +0000
+++ b/sys/dev/ic/smc83c170var.h Thu Nov 07 07:46:39 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smc83c170var.h,v 1.5 2001/05/17 17:32:47 drochner Exp $        */
+/*     $NetBSD: smc83c170var.h,v 1.6 2002/11/07 07:48:36 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@
 
        int     sc_rxptr;               /* next ready RX descriptor */
 
-       int     sc_serinst;             /* ifmedia instance for serial mode */
+       u_int   sc_serinst;             /* ifmedia instance for serial mode */
 };
 
 #define        EPIC_CDTXADDR(sc, x)    ((sc)->sc_cddma + EPIC_CDTXOFF((x)))



Home | Main Index | Thread Index | Old Index