Module Name: src
Committed By: christos
Date: Thu Sep 26 01:28:27 UTC 2019
Modified Files:
src/sys/compat/common: if_media_80.c rndpseudo_50.c usb_subr_30.c
vfs_syscalls_20.c
Log Message:
fix sign-compare issues.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/compat/common/if_media_80.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/rndpseudo_50.c \
src/sys/compat/common/usb_subr_30.c
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/common/vfs_syscalls_20.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/common/if_media_80.c
diff -u src/sys/compat/common/if_media_80.c:1.1 src/sys/compat/common/if_media_80.c:1.2
--- src/sys/compat/common/if_media_80.c:1.1 Fri May 17 03:37:11 2019
+++ src/sys/compat/common/if_media_80.c Wed Sep 25 21:28:27 2019
@@ -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
{
struct ifmediareq *ifmr = (struct ifmediareq *)ifr;
size_t minwords;
- int count, *kptr;
- int error;
+ size_t count;
+ int error, *kptr;
switch (cmd) {
case SIOCSIFMEDIA:
Index: src/sys/compat/common/rndpseudo_50.c
diff -u src/sys/compat/common/rndpseudo_50.c:1.4 src/sys/compat/common/rndpseudo_50.c:1.5
--- src/sys/compat/common/rndpseudo_50.c:1.4 Fri Mar 1 06:06:56 2019
+++ src/sys/compat/common/rndpseudo_50.c Wed Sep 25 21:28:27 2019
@@ -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_l
{
rndstat_t rstbuf = {.start = 0};
rndstat50_t *rst50 = (rndstat50_t *)addr;
- int count;
+ size_t count;
if (rst50->count > RND_MAXSTATCOUNT50)
return EINVAL;
Index: src/sys/compat/common/usb_subr_30.c
diff -u src/sys/compat/common/usb_subr_30.c:1.4 src/sys/compat/common/usb_subr_30.c:1.5
--- src/sys/compat/common/usb_subr_30.c:1.4 Fri Mar 1 06:06:56 2019
+++ src/sys/compat/common/usb_subr_30.c Wed Sep 25 21:28:27 2019
@@ -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_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_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];
Index: src/sys/compat/common/vfs_syscalls_20.c
diff -u src/sys/compat/common/vfs_syscalls_20.c:1.42 src/sys/compat/common/vfs_syscalls_20.c:1.43
--- src/sys/compat/common/vfs_syscalls_20.c:1.42 Sun Sep 22 18:59:38 2019
+++ src/sys/compat/common/vfs_syscalls_20.c Wed Sep 25 21:28:27 2019
@@ -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, voi
{
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;