Fix signed/unsigned comparison warnings.
This commit is contained in:
parent
2aaf72cb84
commit
37dfab8a5b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: disklabel.c,v 1.27 2000/07/07 08:03:36 itohy Exp $ */
|
||||
/* $NetBSD: disklabel.c,v 1.28 2002/11/11 06:24:08 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1987, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 5/3/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: disklabel.c,v 1.27 2000/07/07 08:03:36 itohy Exp $");
|
||||
__RCSID("$NetBSD: disklabel.c,v 1.28 2002/11/11 06:24:08 thorpej Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -127,7 +127,7 @@ getdiskbyname(name)
|
|||
dp->d_flags |= D_BADSECT;
|
||||
|
||||
#define getnumdflt(field, dname, dflt) \
|
||||
(field) = (u_int32_t) ((cgetnum(buf, dname, &f) == -1) ? (dflt) : f)
|
||||
(field) = ((cgetnum(buf, dname, &f) == -1) ? (dflt) : (u_int32_t) f)
|
||||
#define getnum(field, dname) \
|
||||
if (cgetnum(buf, dname, &f) != -1) field = (u_int32_t)f
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fmtmsg.c,v 1.2 1999/09/13 18:36:02 kleink Exp $ */
|
||||
/* $NetBSD: fmtmsg.c,v 1.3 2002/11/11 06:31:14 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: fmtmsg.c,v 1.2 1999/09/13 18:36:02 kleink Exp $");
|
||||
__RCSID("$NetBSD: fmtmsg.c,v 1.3 2002/11/11 06:31:14 thorpej Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <fmtmsg.h>
|
||||
|
@ -84,7 +84,7 @@ static unsigned int
|
|||
msgverb(str)
|
||||
const char *str;
|
||||
{
|
||||
int i;
|
||||
u_int i;
|
||||
unsigned int result;
|
||||
|
||||
if (str == NULL)
|
||||
|
@ -134,7 +134,8 @@ severity2str(severity)
|
|||
{
|
||||
const char *result;
|
||||
|
||||
if (severity < nseverities)
|
||||
if (severity >= 0 &&
|
||||
(u_int) severity < nseverities)
|
||||
result = severities[severity];
|
||||
else
|
||||
result = NULL;
|
||||
|
|
Loading…
Reference in New Issue