diff options
| author | christos <christos@NetBSD.org> | 2019-09-26 01:28:27 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2019-09-26 01:28:27 +0000 |
| commit | 8a0428635aeec00f4038341b06aa9d7d30206843 (patch) | |
| tree | eabe6344731554ba5cbd5c96314242336655ed87 /sys/compat | |
| parent | 34417aba2b5c268a203b5ed3c14f162a90ba0956 (diff) | |
fix sign-compare issues.
Diffstat (limited to 'sys/compat')
| -rw-r--r-- | sys/compat/common/if_media_80.c | 6 | ||||
| -rw-r--r-- | sys/compat/common/rndpseudo_50.c | 6 | ||||
| -rw-r--r-- | sys/compat/common/usb_subr_30.c | 9 | ||||
| -rw-r--r-- | sys/compat/common/vfs_syscalls_20.c | 6 |
4 files changed, 14 insertions, 13 deletions
diff --git a/sys/compat/common/if_media_80.c b/sys/compat/common/if_media_80.c index 829beac1f00..689895f5037 100644 --- a/sys/compat/common/if_media_80.c +++ b/sys/compat/common/if_media_80.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_media_80.c,v 1.1 2019/05/17 07:37:11 msaitoh Exp $ */ +/* $NetBSD: if_media_80.c,v 1.2 2019/09/26 01:28:27 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -126,8 +126,8 @@ compat_ifmediareq_post(struct ifreq *ifr, u_long cmd) { struct ifmediareq *ifmr = (struct ifmediareq *)ifr; size_t minwords; - int count, *kptr; - int error; + size_t count; + int error, *kptr; switch (cmd) { case SIOCSIFMEDIA: diff --git a/sys/compat/common/rndpseudo_50.c b/sys/compat/common/rndpseudo_50.c index bccc239c6fa..e5126742125 100644 --- a/sys/compat/common/rndpseudo_50.c +++ b/sys/compat/common/rndpseudo_50.c @@ -1,4 +1,4 @@ -/* $NetBSD: rndpseudo_50.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $ */ +/* $NetBSD: rndpseudo_50.c,v 1.5 2019/09/26 01:28:27 christos Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rndpseudo_50.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rndpseudo_50.c,v 1.5 2019/09/26 01:28:27 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -76,7 +76,7 @@ compat_50_rnd_ioctl(struct file *fp, u_long cmd, void *addr) { rndstat_t rstbuf = {.start = 0}; rndstat50_t *rst50 = (rndstat50_t *)addr; - int count; + size_t count; if (rst50->count > RND_MAXSTATCOUNT50) return EINVAL; diff --git a/sys/compat/common/usb_subr_30.c b/sys/compat/common/usb_subr_30.c index f6b07fe4820..d94ae04b1c5 100644 --- a/sys/compat/common/usb_subr_30.c +++ b/sys/compat/common/usb_subr_30.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr_30.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $ */ +/* $NetBSD: usb_subr_30.c,v 1.5 2019/09/26 01:28:27 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb_subr_30.c,v 1.4 2019/03/01 11:06:56 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_subr_30.c,v 1.5 2019/09/26 01:28:27 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -131,7 +131,8 @@ usbd_fill_deviceinfo_old(struct usbd_device *dev, int (*do_printBCD)(char *cp, size_t l, int bcd)) { struct usbd_port *p; - int i, j, err; + size_t i, j; + int err; di->udi_bus = device_unit(dev->ud_bus->ub_usbctl); di->udi_addr = dev->ud_addr; @@ -171,7 +172,7 @@ usbd_fill_deviceinfo_old(struct usbd_device *dev, return 0; } - const int nports = dev->ud_hub->uh_hubdesc.bNbrPorts; + const u_int nports = dev->ud_hub->uh_hubdesc.bNbrPorts; for (i = 1; i <= __arraycount(di->udi_ports) && i <= nports; i++) { p = &dev->ud_hub->uh_ports[i - 1]; diff --git a/sys/compat/common/vfs_syscalls_20.c b/sys/compat/common/vfs_syscalls_20.c index bf6743d5cd0..da15c8cbc64 100644 --- a/sys/compat/common/vfs_syscalls_20.c +++ b/sys/compat/common/vfs_syscalls_20.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls_20.c,v 1.42 2019/09/22 22:59:38 christos Exp $ */ +/* $NetBSD: vfs_syscalls_20.c,v 1.43 2019/09/26 01:28:27 christos Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.42 2019/09/22 22:59:38 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.43 2019/09/26 01:28:27 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -104,7 +104,7 @@ statvfs_to_statfs12(const void *vfs, void *vbfs, size_t len) { struct statfs12 ofs, *bfs = vbfs; const struct statvfs *fs = vfs; - int i; + size_t i; ofs.f_type = 0; ofs.f_oflags = (short)fs->f_flag; |
