From 5c48495613c33fb0b88c2cb5260c8da7218102fc Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 20 Oct 1996 21:01:46 +0000 Subject: [PATCH] Fix signed/unsigned comparison warnings. Reviewed by: bde --- sys/fs/cd9660/cd9660_lookup.c | 4 ++-- sys/fs/cd9660/cd9660_vnops.c | 8 ++++---- sys/isofs/cd9660/cd9660_lookup.c | 4 ++-- sys/isofs/cd9660/cd9660_vnops.c | 8 ++++---- sys/kern/init_main.c | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/fs/cd9660/cd9660_lookup.c b/sys/fs/cd9660/cd9660_lookup.c index c22bfcdf1832..002cc5d4f1e6 100644 --- a/sys/fs/cd9660/cd9660_lookup.c +++ b/sys/fs/cd9660/cd9660_lookup.c @@ -38,7 +38,7 @@ * from: @(#)ufs_lookup.c 7.33 (Berkeley) 5/19/91 * * @(#)cd9660_lookup.c 8.2 (Berkeley) 1/23/94 - * $Id: cd9660_lookup.c,v 1.8 1995/10/22 09:32:15 davidg Exp $ + * $Id: cd9660_lookup.c,v 1.9 1995/11/12 10:16:50 davidg Exp $ */ #include @@ -154,7 +154,7 @@ cd9660_lookup(ap) * we are looking for is known already. */ if ((error = cache_lookup(vdp, vpp, cnp))) { - int vpid; /* capability number of vnode */ + u_long vpid; /* capability number of vnode */ if (error == ENOENT) return (error); diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index c78d7e58351a..8ac9cd4958d6 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94 - * $Id: cd9660_vnops.c,v 1.25 1996/05/02 10:43:14 phk Exp $ + * $Id: cd9660_vnops.c,v 1.26 1996/09/20 05:51:12 nate Exp $ */ #include @@ -157,11 +157,11 @@ cd9660_setattr(ap) struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; - if (vap->va_flags != VNOVAL || vap->va_uid != (uid_t)VNOVAL || + if (vap->va_flags != (u_long)VNOVAL || vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL || vap->va_atime.tv_sec != VNOVAL || vap->va_mtime.tv_sec != VNOVAL || vap->va_mode != (mode_t)VNOVAL) return (EROFS); - if (vap->va_size != VNOVAL) { + if (vap->va_size != (u_quad_t)VNOVAL) { switch (vp->v_type) { case VDIR: return (EISDIR); @@ -797,7 +797,7 @@ cd9660_readlink(ap) * 1: Check not cross boundary on block */ if ((ip->i_number & imp->im_bmask) + isonum_711(dirp->length) - > imp->logical_block_size) { + > (unsigned)imp->logical_block_size) { brelse(bp); return EINVAL; } diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c index c22bfcdf1832..002cc5d4f1e6 100644 --- a/sys/isofs/cd9660/cd9660_lookup.c +++ b/sys/isofs/cd9660/cd9660_lookup.c @@ -38,7 +38,7 @@ * from: @(#)ufs_lookup.c 7.33 (Berkeley) 5/19/91 * * @(#)cd9660_lookup.c 8.2 (Berkeley) 1/23/94 - * $Id: cd9660_lookup.c,v 1.8 1995/10/22 09:32:15 davidg Exp $ + * $Id: cd9660_lookup.c,v 1.9 1995/11/12 10:16:50 davidg Exp $ */ #include @@ -154,7 +154,7 @@ cd9660_lookup(ap) * we are looking for is known already. */ if ((error = cache_lookup(vdp, vpp, cnp))) { - int vpid; /* capability number of vnode */ + u_long vpid; /* capability number of vnode */ if (error == ENOENT) return (error); diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index c78d7e58351a..8ac9cd4958d6 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94 - * $Id: cd9660_vnops.c,v 1.25 1996/05/02 10:43:14 phk Exp $ + * $Id: cd9660_vnops.c,v 1.26 1996/09/20 05:51:12 nate Exp $ */ #include @@ -157,11 +157,11 @@ cd9660_setattr(ap) struct vnode *vp = ap->a_vp; struct vattr *vap = ap->a_vap; - if (vap->va_flags != VNOVAL || vap->va_uid != (uid_t)VNOVAL || + if (vap->va_flags != (u_long)VNOVAL || vap->va_uid != (uid_t)VNOVAL || vap->va_gid != (gid_t)VNOVAL || vap->va_atime.tv_sec != VNOVAL || vap->va_mtime.tv_sec != VNOVAL || vap->va_mode != (mode_t)VNOVAL) return (EROFS); - if (vap->va_size != VNOVAL) { + if (vap->va_size != (u_quad_t)VNOVAL) { switch (vp->v_type) { case VDIR: return (EISDIR); @@ -797,7 +797,7 @@ cd9660_readlink(ap) * 1: Check not cross boundary on block */ if ((ip->i_number & imp->im_bmask) + isonum_711(dirp->length) - > imp->logical_block_size) { + > (unsigned)imp->logical_block_size) { brelse(bp); return EINVAL; } diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index cca436fefbe4..2339bf2d880f 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 - * $Id: init_main.c,v 1.48 1996/09/03 10:22:58 asami Exp $ + * $Id: init_main.c,v 1.49 1996/09/23 04:37:54 peter Exp $ */ #include "opt_rlimit.h" @@ -308,7 +308,7 @@ proc0_init(dummy) { register struct proc *p; register struct filedesc0 *fdp; - register int i; + register unsigned i; /* * Initialize the current process pointer (curproc) before