Fix signed/unsigned comparison warnings.

This commit is contained in:
thorpej 2002-11-09 18:52:20 +00:00
parent a1ef3f204e
commit 73f78d5e61
12 changed files with 36 additions and 33 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat_13_machdep.c,v 1.8 2000/12/22 22:58:55 jdolecek Exp $ */
/* $NetBSD: compat_13_machdep.c,v 1.9 2002/11/09 19:26:12 thorpej Exp $ */
/*
* Copyright 1996 The Board of Trustees of The Leland Stanford
@ -15,7 +15,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.8 2000/12/22 22:58:55 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.9 2002/11/09 19:26:12 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -63,7 +63,7 @@ compat_13_sys_sigreturn(p, v, retval)
if ((error = copyin(scp, &ksc, sizeof(ksc))) != 0)
return (error);
if ((int)ksc.sc_regs[ZERO] != 0xACEDBADE) /* magic number */
if ((u_int)ksc.sc_regs[ZERO] != 0xacedbadeU) /* magic number */
return (EINVAL);
/* Resture the register context. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: gio.c,v 1.7 2002/10/02 15:52:33 thorpej Exp $ */
/* $NetBSD: gio.c,v 1.8 2002/11/09 18:55:45 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -94,7 +94,7 @@ gio_print(aux, pnp)
if (ga->ga_slot != GIOCF_SLOT_DEFAULT)
printf(" slot %d", ga->ga_slot);
if (ga->ga_addr != GIOCF_ADDR_DEFAULT)
if (ga->ga_addr != (uint32_t) GIOCF_ADDR_DEFAULT)
printf(" addr 0x%x", ga->ga_addr);
return UNCONF;

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpc.c,v 1.11 2002/10/02 04:09:15 thorpej Exp $ */
/* $NetBSD: hpc.c,v 1.12 2002/11/09 18:54:27 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -199,7 +199,7 @@ hpc_submatch(struct device *parent, struct cfdata *cf, void *aux)
struct hpc_attach_args *ha = aux;
if (cf->cf_loc[HPCCF_OFFSET] != HPCCF_OFFSET_DEFAULT &&
cf->cf_loc[HPCCF_OFFSET] != ha->ha_devoff)
(bus_addr_t) cf->cf_loc[HPCCF_OFFSET] != ha->ha_devoff)
return (0);
return (config_match(parent, cf, aux));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sq.c,v 1.14 2002/10/02 04:09:15 thorpej Exp $ */
/* $NetBSD: if_sq.c,v 1.15 2002/11/09 18:53:25 thorpej Exp $ */
/*
* Copyright (c) 2001 Rafal K. Boni
@ -1068,7 +1068,7 @@ sq_add_rxbuf(struct sq_softc *sc, int idx)
void
sq_dump_buffer(u_int32_t addr, u_int32_t len)
{
int i;
u_int i;
u_char* physaddr = (char*) MIPS_PHYS_TO_KSEG1((caddr_t)addr);
if (len == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbic.c,v 1.10 2002/09/27 15:36:40 provos Exp $ */
/* $NetBSD: sbic.c,v 1.11 2002/11/09 18:52:20 thorpej Exp $ */
/*
* Changes Copyright (c) 2001 Wayne Knowles
@ -405,7 +405,8 @@ void
wd33c93_dma_stop(dev)
struct wd33c93_softc *dev;
{
int count, asr;
size_t count;
int asr;
/* Wait until WD chip is idle */
do {
@ -757,12 +758,12 @@ wd33c93_dequeue(dev, acb)
{
struct wd33c93_tinfo *ti = &dev->sc_tinfo[acb->xs->xs_periph->periph_target];
struct wd33c93_linfo *li;
u_int32_t lun = acb->xs->xs_periph->periph_lun;
int lun = acb->xs->xs_periph->periph_lun;
li = TINFO_LUN(ti, lun);
#ifdef DIAGNOSTIC
if (li == NULL || li->lun != lun)
panic("wd33c93_dequeue: lun %x for ecb %p does not exist",
panic("wd33c93_dequeue: lun %d for ecb %p does not exist",
lun, acb);
#endif
if (li->untagged == acb) {
@ -773,7 +774,7 @@ wd33c93_dequeue(dev, acb)
#ifdef DIAGNOSTIC
if (li->queued[acb->tag_id] != NULL &&
(li->queued[acb->tag_id] != acb))
panic("wd33c93_dequeue: slot %d for lun %x has %p "
panic("wd33c93_dequeue: slot %d for lun %d has %p "
"instead of acb %p\n", acb->tag_id,
lun, li->queued[acb->tag_id], acb);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip22.c,v 1.13 2002/06/04 05:42:41 simonb Exp $ */
/* $NetBSD: ip22.c,v 1.14 2002/11/09 19:21:12 thorpej Exp $ */
/*
* Copyright (c) 2001, 2002 Rafal K. Boni
@ -76,7 +76,7 @@ extern void ip22_sdcache_disable(void);
void
ip22_init(void)
{
int i;
u_int i;
u_int32_t sysid;
u_int32_t int23addr;
unsigned long cps;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.41 2002/09/27 15:36:41 provos Exp $ */
/* $NetBSD: machdep.c,v 1.42 2002/11/09 19:20:18 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -516,7 +516,7 @@ mach_init(argc, argv, magic, btinfo)
* virtual address space.
*/
v = (caddr_t)uvm_pageboot_alloc(size);
if ((allocsys(v, NULL) - v) != size)
if ((vsize_t) (allocsys(v, NULL) - v) != size)
panic("mach_init: table size inconsistency");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.10 2002/10/02 15:52:34 thorpej Exp $ */
/* $NetBSD: mainbus.c,v 1.11 2002/11/09 19:24:09 thorpej Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -110,7 +110,7 @@ mainbus_print(aux, pnp)
if (pnp != 0)
return QUIET;
if (ma->ma_addr != MAINBUSCF_ADDR_DEFAULT)
if (ma->ma_addr != (u_long) MAINBUSCF_ADDR_DEFAULT)
printf(" addr 0x%lx", ma->ma_addr);
return UNCONF;

View File

@ -1,4 +1,4 @@
/* $NetBSD: z8530tty.c,v 1.85 2002/10/23 09:13:19 jdolecek Exp $ */
/* $NetBSD: z8530tty.c,v 1.86 2002/11/09 19:22:54 thorpej Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999
@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.85 2002/10/23 09:13:19 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: z8530tty.c,v 1.86 2002/11/09 19:22:54 thorpej Exp $");
#include "opt_kgdb.h"
@ -1028,7 +1028,8 @@ zsparam(tp, t)
{
struct zstty_softc *zst = device_lookup(&zstty_cd, ZSUNIT(tp->t_dev));
struct zs_chanstate *cs = zst->zst_cs;
int ospeed, cflag;
int ospeed;
tcflag_t cflag;
u_char tmp3, tmp4, tmp5;
int s, error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd.c,v 1.169 2002/11/01 11:31:59 mrg Exp $ */
/* $NetBSD: cd.c,v 1.170 2002/11/09 18:58:26 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.169 2002/11/01 11:31:59 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.170 2002/11/09 18:58:26 thorpej Exp $");
#include "rnd.h"
@ -1247,7 +1247,7 @@ cdioctl(dev, cmd, addr, flag, p)
struct ioc_read_subchannel *args =
(struct ioc_read_subchannel *)addr;
struct cd_sub_channel_info data;
int len = args->data_len;
u_int len = args->data_len;
if (len > sizeof(data) ||
len < sizeof(struct cd_sub_channel_header))
@ -1280,7 +1280,7 @@ cdioctl(dev, cmd, addr, flag, p)
(struct ioc_read_toc_entry *)addr;
struct ioc_toc_header *th;
struct cd_toc_entry *cte;
int len = te->data_len;
u_int len = te->data_len;
int ntracks;
th = &toc.header;

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipi_base.c,v 1.80 2002/10/04 03:41:50 soren Exp $ */
/* $NetBSD: scsipi_base.c,v 1.81 2002/11/09 19:02:27 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.80 2002/10/04 03:41:50 soren Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.81 2002/11/09 19:02:27 thorpej Exp $");
#include "opt_scsi.h"
@ -327,7 +327,8 @@ scsipi_get_tag(xs)
struct scsipi_xfer *xs;
{
struct scsipi_periph *periph = xs->xs_periph;
int word, bit, tag;
int bit, tag;
u_int word;
for (word = 0; word < PERIPH_NTAGWORDS; word++) {
bit = ffs(periph->periph_freetags[word]);

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsipiconf.c,v 1.18 2002/10/04 17:53:35 soren Exp $ */
/* $NetBSD: scsipiconf.c,v 1.19 2002/11/09 19:03:41 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.18 2002/10/04 17:53:35 soren Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsipiconf.c,v 1.19 2002/11/09 19:03:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -108,7 +108,7 @@ scsipi_alloc_periph(malloc_flag)
int malloc_flag;
{
struct scsipi_periph *periph;
int i;
u_int i;
periph = malloc(sizeof(*periph), M_DEVBUF, malloc_flag|M_ZERO);
if (periph == NULL)