Source-Changes-HG archive

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

[src/trunk]: src/sys use unsigned variable types as appropriate



details:   https://anonhg.NetBSD.org/src/rev/0fd7f2d4560d
branches:  trunk
changeset: 513621:0fd7f2d4560d
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Aug 05 18:07:51 2001 +0000

description:
use unsigned variable types as appropriate

diffstat:

 sys/arch/amiga/dev/grf_cl.c               |  4 ++--
 sys/arch/amiga/dev/grfioctl.h             |  6 +++---
 sys/arch/arm32/vidc/vidcvideo.c           |  6 +++---
 sys/arch/hpcmips/dev/plumvideo.c          |  5 +++--
 sys/arch/hpcsh/dev/hd64461/hd64461video.c |  5 +++--
 sys/arch/macppc/dev/ofb.c                 |  6 +++---
 sys/arch/sparc/dev/cgtwo.c                |  5 +++--
 sys/arch/sun3/dev/cg2.c                   |  5 +++--
 sys/dev/pci/tga.c                         |  5 +++--
 sys/dev/sun/fbio.h                        |  6 +++---
 sys/dev/tc/cfb.c                          |  6 +++---
 sys/dev/tc/mfb.c                          |  6 +++---
 sys/dev/tc/sfb.c                          |  6 +++---
 sys/dev/tc/sfbplus.c                      |  6 +++---
 sys/dev/tc/stic.c                         |  4 ++--
 sys/dev/tc/tfb.c                          |  6 +++---
 sys/dev/tc/xcfb.c                         |  6 +++---
 sys/net/if_ppp.c                          |  5 +++--
 18 files changed, 52 insertions(+), 46 deletions(-)

diffs (truncated from 399 to 300 lines):

diff -r caed927a412c -r 0fd7f2d4560d sys/arch/amiga/dev/grf_cl.c
--- a/sys/arch/amiga/dev/grf_cl.c       Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/amiga/dev/grf_cl.c       Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grf_cl.c,v 1.25 1999/06/29 19:51:28 is Exp $   */
+/*     $NetBSD: grf_cl.c,v 1.26 2001/08/05 18:07:52 jdolecek Exp $     */
 
 /*
  * Copyright (c) 1997 Klaus Burkert
@@ -905,7 +905,7 @@
 
        if (data->set & GRFSPRSET_SHAPE) {
 
-                short dsx, dsy, i;
+                unsigned short dsx, dsy, i;
                 unsigned long *di, *dm, *si, *sm;
                 unsigned long ssi[128], ssm[128];
                 struct grf_position gpos;
diff -r caed927a412c -r 0fd7f2d4560d sys/arch/amiga/dev/grfioctl.h
--- a/sys/arch/amiga/dev/grfioctl.h     Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/amiga/dev/grfioctl.h     Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grfioctl.h,v 1.13 1997/07/29 17:54:11 veego Exp $      */
+/*     $NetBSD: grfioctl.h,v 1.14 2001/08/05 18:07:51 jdolecek Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -147,8 +147,8 @@
  * Maxium value of "index" can be deduced from grfinfo->gd_colors.
  */
 struct grf_colormap {
-       int     index;          /* start at red[index],green[index],blue[index] */
-       int     count;          /* till < red[index+count],... */
+       unsigned int    index;          /* start at red[index],green[index],blue[index] */
+       unsigned int    count;          /* till < red[index+count],... */
        u_char  *red;
        u_char  *green;
        u_char  *blue;
diff -r caed927a412c -r 0fd7f2d4560d sys/arch/arm32/vidc/vidcvideo.c
--- a/sys/arch/arm32/vidc/vidcvideo.c   Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/arm32/vidc/vidcvideo.c   Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vidcvideo.c,v 1.7 2001/04/14 02:25:43 reinoud Exp $ */
+/* $NetBSD: vidcvideo.c,v 1.8 2001/08/05 18:07:52 jdolecek Exp $ */
 
 /*
  * Copyright (c) 2001 Reinoud Zandijk
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: vidcvideo.c,v 1.7 2001/04/14 02:25:43 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vidcvideo.c,v 1.8 2001/08/05 18:07:52 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -773,7 +773,7 @@
        struct wsdisplay_cursor *p;
 {
 #define        cc (&sc->sc_cursor)
-       int v, index, count, icount;
+       u_int v, index, count, icount;
 
        v = p->which;
        if (v & WSDISPLAY_CURSOR_DOCMAP) {
diff -r caed927a412c -r 0fd7f2d4560d sys/arch/hpcmips/dev/plumvideo.c
--- a/sys/arch/hpcmips/dev/plumvideo.c  Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/hpcmips/dev/plumvideo.c  Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plumvideo.c,v 1.19 2001/07/22 09:56:41 takemura Exp $ */
+/*     $NetBSD: plumvideo.c,v 1.20 2001/08/05 18:07:52 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -417,7 +417,8 @@
        struct wsdisplay_cmap *cmap;
        u_int8_t *r, *g, *b;
        u_int32_t *rgb;
-       int idx, cnt, error;
+       int idx, error;
+       size_t cnt;
 
        switch (cmd) {
        case WSDISPLAYIO_GETCMAP:
diff -r caed927a412c -r 0fd7f2d4560d sys/arch/hpcsh/dev/hd64461/hd64461video.c
--- a/sys/arch/hpcsh/dev/hd64461/hd64461video.c Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/hpcsh/dev/hd64461/hd64461video.c Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hd64461video.c,v 1.3 2001/07/22 09:56:40 takemura Exp $        */
+/*     $NetBSD: hd64461video.c,v 1.4 2001/08/05 18:07:54 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -410,7 +410,8 @@
        struct hpcfb_dspconf *dspconf;
        struct wsdisplay_cmap *cmap;
        u_int8_t *r, *g, *b;
-       int idx, cnt, error;
+       int error;
+       size_t idx, cnt;
 
        switch (cmd) {
        case WSDISPLAYIO_GETCMAP:
diff -r caed927a412c -r 0fd7f2d4560d sys/arch/macppc/dev/ofb.c
--- a/sys/arch/macppc/dev/ofb.c Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/macppc/dev/ofb.c Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofb.c,v 1.24 2001/07/22 11:29:47 wiz Exp $     */
+/*     $NetBSD: ofb.c,v 1.25 2001/08/05 18:07:53 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -536,8 +536,8 @@
        struct wsdisplay_cmap *cm;
 {
        struct ofb_devconfig *dc = sc->sc_dc;
-       int index = cm->index;
-       int count = cm->count;
+       u_int index = cm->index;
+       u_int count = cm->count;
        int i;
        u_char *r, *g, *b;
 
diff -r caed927a412c -r 0fd7f2d4560d sys/arch/sparc/dev/cgtwo.c
--- a/sys/arch/sparc/dev/cgtwo.c        Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/sparc/dev/cgtwo.c        Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgtwo.c,v 1.34 2000/08/22 21:28:35 pk Exp $ */
+/*     $NetBSD: cgtwo.c,v 1.35 2001/08/05 18:07:53 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -363,7 +363,8 @@
        register struct fbcmap *cmap;
 {
        u_char red[CG2_CMSIZE], green[CG2_CMSIZE], blue[CG2_CMSIZE];
-       int error, start, count, ecount;
+       int error;
+       u_int start, count, ecount;
        register u_int i;
        register volatile u_short *p;
 
diff -r caed927a412c -r 0fd7f2d4560d sys/arch/sun3/dev/cg2.c
--- a/sys/arch/sun3/dev/cg2.c   Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/arch/sun3/dev/cg2.c   Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cg2.c,v 1.13 2000/06/29 07:18:58 mrg Exp $     */
+/*     $NetBSD: cg2.c,v 1.14 2001/08/05 18:07:53 jdolecek Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -352,7 +352,8 @@
        struct fbcmap *cmap = data;
        struct cg2_softc *sc = fb->fb_private;
        u_char red[CMSIZE], green[CMSIZE], blue[CMSIZE];
-       int error, start, count, ecount;
+       int error;
+       u_int start, count, ecount;
        register u_int i;
        register u_short *p;
 
diff -r caed927a412c -r 0fd7f2d4560d sys/dev/pci/tga.c
--- a/sys/dev/pci/tga.c Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/dev/pci/tga.c Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tga.c,v 1.34 2001/07/16 00:55:16 elric Exp $ */
+/* $NetBSD: tga.c,v 1.35 2001/08/05 18:07:54 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -817,7 +817,8 @@
 {
        struct ramdac_funcs *dcrf = dc->dc_ramdac_funcs;
        struct ramdac_cookie *dcrc = dc->dc_ramdac_cookie;
-       int count, error, v;
+       u_int count, v;
+       int error;
 
        v = cursorp->which;
        if (v & WSDISPLAY_CURSOR_DOCMAP) {
diff -r caed927a412c -r 0fd7f2d4560d sys/dev/sun/fbio.h
--- a/sys/dev/sun/fbio.h        Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/dev/sun/fbio.h        Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fbio.h,v 1.1 2000/08/20 14:00:43 pk Exp $ */
+/*     $NetBSD: fbio.h,v 1.2 2001/08/05 18:07:53 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1992 Regents of the University of California.
@@ -107,8 +107,8 @@
  * Color map I/O.
  */
 struct fbcmap {
-       int     index;          /* first element (0 origin) */
-       int     count;          /* number of elements */
+       u_int   index;          /* first element (0 origin) */
+       u_int   count;          /* number of elements */
        u_char  *red;           /* red color map elements */
        u_char  *green;         /* green color map elements */
        u_char  *blue;          /* blue color map elements */
diff -r caed927a412c -r 0fd7f2d4560d sys/dev/tc/cfb.c
--- a/sys/dev/tc/cfb.c  Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/dev/tc/cfb.c  Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.27 2001/04/20 11:53:06 reinoud Exp $ */
+/* $NetBSD: cfb.c,v 1.28 2001/08/05 18:07:54 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.27 2001/04/20 11:53:06 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.28 2001/08/05 18:07:54 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -722,7 +722,7 @@
        struct wsdisplay_cursor *p;
 {
 #define        cc (&sc->sc_cursor)
-       int v, index, count, icount;
+       u_int v, index, count, icount;
 
        v = p->which;
        if (v & WSDISPLAY_CURSOR_DOCMAP) {
diff -r caed927a412c -r 0fd7f2d4560d sys/dev/tc/mfb.c
--- a/sys/dev/tc/mfb.c  Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/dev/tc/mfb.c  Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.26 2001/01/16 05:32:16 nisimura Exp $ */
+/* $NetBSD: mfb.c,v 1.27 2001/08/05 18:07:54 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.26 2001/01/16 05:32:16 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.27 2001/08/05 18:07:54 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -634,7 +634,7 @@
        struct wsdisplay_cursor *p;
 {
 #define        cc (&sc->sc_cursor)
-       int v, count, index;
+       u_int v, count, index;
 
        v = p->which;
        if (v & WSDISPLAY_CURSOR_DOCMAP) {
diff -r caed927a412c -r 0fd7f2d4560d sys/dev/tc/sfb.c
--- a/sys/dev/tc/sfb.c  Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/dev/tc/sfb.c  Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.45 2001/04/20 11:53:06 reinoud Exp $ */
+/* $NetBSD: sfb.c,v 1.46 2001/08/05 18:07:54 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.45 2001/04/20 11:53:06 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.46 2001/08/05 18:07:54 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -758,7 +758,7 @@
        struct wsdisplay_cursor *p;
 {
 #define        cc (&sc->sc_cursor)
-       int v, index, count, icount;
+       u_int v, index, count, icount;
 
        v = p->which;
        if (v & WSDISPLAY_CURSOR_DOCMAP) {
diff -r caed927a412c -r 0fd7f2d4560d sys/dev/tc/sfbplus.c
--- a/sys/dev/tc/sfbplus.c      Sun Aug 05 17:51:40 2001 +0000
+++ b/sys/dev/tc/sfbplus.c      Sun Aug 05 18:07:51 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sfbplus.c,v 1.9 2001/02/27 02:11:36 nisimura Exp $ */
+/* $NetBSD: sfbplus.c,v 1.10 2001/08/05 18:07:55 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.9 2001/02/27 02:11:36 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.10 2001/08/05 18:07:55 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -782,7 +782,7 @@



Home | Main Index | Thread Index | Old Index