Fix -Wsign-compare warnings.

This commit is contained in:
tsutsui 2003-01-11 16:00:48 +00:00
parent 503456a35a
commit 5db9bf0614
7 changed files with 17 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kb.c,v 1.2 2002/03/17 19:40:45 atatat Exp $ */ /* $NetBSD: kb.c,v 1.3 2003/01/11 16:00:48 tsutsui Exp $ */
/* /*
* Copyright (c) 2001 Izumi Tsutsui. * Copyright (c) 2001 Izumi Tsutsui.
@ -112,7 +112,7 @@ kb_cngetc(v, type, data)
int *data; int *data;
{ {
struct console_softc *conssc = v; struct console_softc *conssc = v;
int nkey; u_int nkey;
/* set to polling mode */ /* set to polling mode */
conssc->cs_polling = 1; conssc->cs_polling = 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: kb_hb.c,v 1.3 2002/10/02 04:40:08 thorpej Exp $ */ /* $NetBSD: kb_hb.c,v 1.4 2003/01/11 16:00:48 tsutsui Exp $ */
/* /*
* Copyright (c) 2001 Izumi Tsutsui. * Copyright (c) 2001 Izumi Tsutsui.
@ -74,7 +74,7 @@ kb_hb_match(parent, cf, aux)
return 0; return 0;
/* XXX no default address */ /* XXX no default address */
if (ha->ha_address == -1) if (ha->ha_address == (u_int)-1)
return 0; return 0;
addr = IIOV(ha->ha_address); /* XXX */ addr = IIOV(ha->ha_address); /* XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: kbc.c,v 1.5 2003/01/01 01:54:44 thorpej Exp $ */ /* $NetBSD: kbc.c,v 1.6 2003/01/11 16:00:48 tsutsui Exp $ */
/*- /*-
* Copyright (C) 2001 Izumi Tsutsui. All rights reserved. * Copyright (C) 2001 Izumi Tsutsui. All rights reserved.
@ -65,7 +65,7 @@ static int kbc_match(parent, cf, aux)
return 0; return 0;
/* XXX no default address */ /* XXX no default address */
if (ha->ha_address == -1) if (ha->ha_address == (u_int)-1)
return 0; return 0;
addr = IIOV(ha->ha_address); /* XXX */ addr = IIOV(ha->ha_address); /* XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ms_hb.c,v 1.4 2002/10/02 04:40:08 thorpej Exp $ */ /* $NetBSD: ms_hb.c,v 1.5 2003/01/11 16:00:48 tsutsui Exp $ */
/*- /*-
* Copyright (c) 2001 Izumi Tsutsui. All rights reserved. * Copyright (c) 2001 Izumi Tsutsui. All rights reserved.
@ -77,7 +77,7 @@ ms_hb_match(parent, cf, aux)
return 0; return 0;
/* XXX no default address */ /* XXX no default address */
if (ha->ha_address == -1) if (ha->ha_address == (u_int)-1)
return 0; return 0;
addr = IIOV(ha->ha_address); /* XXX */ addr = IIOV(ha->ha_address); /* XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.11 2003/01/01 01:54:44 thorpej Exp $ */ /* $NetBSD: zs.c,v 1.12 2003/01/11 16:00:48 tsutsui Exp $ */
/*- /*-
* Copyright (c) 1996 The NetBSD Foundation, Inc. * Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -172,7 +172,7 @@ zs_match(parent, cf, aux)
return 0; return 0;
/* XXX no default address */ /* XXX no default address */
if (ha->ha_address == -1) if (ha->ha_address == (u_int)-1)
return 0; return 0;
addr = IIOV(ha->ha_address); addr = IIOV(ha->ha_address);

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.10 2002/12/20 16:54:16 tsutsui Exp $ */ /* $NetBSD: disksubr.c,v 1.11 2003/01/11 16:00:50 tsutsui Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California. * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@ -202,13 +202,13 @@ bounds_check_with_label(bp, lp, wlabel)
{ {
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev); struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsect = lp->d_partitions[0].p_offset; u_int labelsector = lp->d_partitions[0].p_offset + LABELSECTOR;
int maxsz = p->p_size; int maxsz = p->p_size;
int sz = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT; int sz = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT;
/* overwriting disk label ? */ /* overwriting disk label ? */
/* XXX should also protect bootstrap in first 8K */ /* XXX should also protect bootstrap in first 8K */
if (bp->b_blkno + p->p_offset <= LABELSECTOR + labelsect && if (bp->b_blkno + p->p_offset <= labelsector &&
(bp->b_flags & B_READ) == 0 && wlabel == 0) { (bp->b_flags & B_READ) == 0 && wlabel == 0) {
bp->b_error = EROFS; bp->b_error = EROFS;
goto bad; goto bad;

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.23 2002/12/20 16:54:17 tsutsui Exp $ */ /* $NetBSD: trap.c,v 1.24 2003/01/11 16:00:50 tsutsui Exp $ */
/* /*
* Copyright (c) 1988 University of Utah. * Copyright (c) 1988 University of Utah.
@ -319,7 +319,7 @@ trap(type, code, v, frame)
} }
regdump((struct trapframe *)&frame, 128); regdump((struct trapframe *)&frame, 128);
type &= ~T_USER; type &= ~T_USER;
if ((u_int)type < trap_types) if (type < trap_types)
panic(trap_type[type]); panic(trap_type[type]);
panic("trap"); panic("trap");
@ -589,9 +589,9 @@ trap(type, code, v, frame)
if ((vm != NULL && (caddr_t)va >= vm->vm_maxsaddr) if ((vm != NULL && (caddr_t)va >= vm->vm_maxsaddr)
&& map != kernel_map) { && map != kernel_map) {
if (rv == 0) { if (rv == 0) {
unsigned nss; int nss;
nss = btoc(USRSTACK-(unsigned)va); nss = btoc(USRSTACK-(u_int)va);
if (nss > vm->vm_ssize) if (nss > vm->vm_ssize)
vm->vm_ssize = nss; vm->vm_ssize = nss;
} else if (rv == EACCES) } else if (rv == EACCES)