Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix signed/unsigned comparison warnings.
details: https://anonhg.NetBSD.org/src/rev/89cdedd08ce3
branches: trunk
changeset: 539171:89cdedd08ce3
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sun Nov 10 03:28:59 2002 +0000
description:
Fix signed/unsigned comparison warnings.
diffstat:
sys/dev/rnd.c | 10 +++++-----
sys/dev/rndpool.c | 6 +++---
sys/kern/kern_ktrace.c | 6 +++---
sys/sys/rnd.h | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
diffs (118 lines):
diff -r cb7e0540fd40 -r 89cdedd08ce3 sys/dev/rnd.c
--- a/sys/dev/rnd.c Sun Nov 10 03:24:51 2002 +0000
+++ b/sys/dev/rnd.c Sun Nov 10 03:28:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd.c,v 1.36 2002/10/23 09:13:04 jdolecek Exp $ */
+/* $NetBSD: rnd.c,v 1.37 2002/11/10 03:29:00 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rnd.c,v 1.36 2002/10/23 09:13:04 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rnd.c,v 1.37 2002/11/10 03:29:00 thorpej Exp $");
#include <sys/param.h>
#include <sys/ioctl.h>
@@ -374,8 +374,8 @@
rndread(dev_t dev, struct uio *uio, int ioflag)
{
u_int8_t *buf;
- u_int32_t entcnt, mode, nread;
- int n, ret, s;
+ u_int32_t entcnt, mode, n, nread;
+ int ret, s;
DPRINTF(RND_DEBUG_READ,
("Random: Read of %d requested, flags 0x%08x\n",
@@ -1076,7 +1076,7 @@
rnd_wakeup_readers();
}
-int
+u_int32_t
rnd_extract_data(void *p, u_int32_t len, u_int32_t flags)
{
int retval, s;
diff -r cb7e0540fd40 -r 89cdedd08ce3 sys/dev/rndpool.c
--- a/sys/dev/rndpool.c Sun Nov 10 03:24:51 2002 +0000
+++ b/sys/dev/rndpool.c Sun Nov 10 03:28:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rndpool.c,v 1.16 2002/10/09 14:48:58 dan Exp $ */
+/* $NetBSD: rndpool.c,v 1.17 2002/11/10 03:29:00 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rndpool.c,v 1.16 2002/10/09 14:48:58 dan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rndpool.c,v 1.17 2002/11/10 03:29:00 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -252,7 +252,7 @@
* etc. Note that we must have at least 64 bits of entropy in the pool
* before we return anything in the high-quality modes.
*/
-int
+u_int32_t
rndpool_extract_data(rndpool_t *rp, void *p, u_int32_t len, u_int32_t mode)
{
u_int i;
diff -r cb7e0540fd40 -r 89cdedd08ce3 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c Sun Nov 10 03:24:51 2002 +0000
+++ b/sys/kern/kern_ktrace.c Sun Nov 10 03:28:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_ktrace.c,v 1.59 2002/10/23 09:14:18 jdolecek Exp $ */
+/* $NetBSD: kern_ktrace.c,v 1.60 2002/11/10 03:30:34 thorpej Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.59 2002/10/23 09:14:18 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.60 2002/11/10 03:30:34 thorpej Exp $");
#include "opt_ktrace.h"
@@ -126,7 +126,7 @@
register_t *argp;
int argsize;
size_t len;
- int i;
+ u_int i;
argsize = p->p_emul->e_sysent[code].sy_narg * sizeof (register_t);
len = sizeof(struct ktr_syscall) + argsize;
diff -r cb7e0540fd40 -r 89cdedd08ce3 sys/sys/rnd.h
--- a/sys/sys/rnd.h Sun Nov 10 03:24:51 2002 +0000
+++ b/sys/sys/rnd.h Sun Nov 10 03:28:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd.h,v 1.15 2002/08/20 22:30:53 itojun Exp $ */
+/* $NetBSD: rnd.h,v 1.16 2002/11/10 03:28:59 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -152,14 +152,14 @@
u_int32_t rndpool_get_poolsize __P((void));
void rndpool_add_data __P((rndpool_t *, void *, u_int32_t,
u_int32_t));
-int rndpool_extract_data __P((rndpool_t *, void *, u_int32_t,
+u_int32_t rndpool_extract_data __P((rndpool_t *, void *, u_int32_t,
u_int32_t));
void rnd_init __P((void));
void rnd_add_uint32 __P((rndsource_element_t *, u_int32_t));
void rnd_add_data __P((rndsource_element_t *, void *, u_int32_t,
u_int32_t));
-int rnd_extract_data __P((void *, u_int32_t, u_int32_t));
+u_int32_t rnd_extract_data __P((void *, u_int32_t, u_int32_t));
void rnd_attach_source __P((rndsource_element_t *, char *,
u_int32_t, u_int32_t));
void rnd_detach_source __P((rndsource_element_t *));
Home |
Main Index |
Thread Index |
Old Index