diff options
author | dillon <dillon@FreeBSD.org> | 1999-01-27 22:42:27 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-01-27 22:42:27 +0000 |
commit | dbf5cd2b57217eb6c73488177fc6a096ead934b6 (patch) | |
tree | 1de192fde2322188e529943e6982359b783fd78e /sys/fs | |
parent | 5a53b379176ab48879944fa794655a1cbc840630 (diff) | |
download | FreeBSD-src-dbf5cd2b57217eb6c73488177fc6a096ead934b6.zip FreeBSD-src-dbf5cd2b57217eb6c73488177fc6a096ead934b6.tar.gz |
Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 4 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vnops.c | 4 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 7 | ||||
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 6 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_subr.c | 6 | ||||
-rw-r--r-- | sys/fs/procfs/procfs_vnops.c | 12 | ||||
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 7 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 4 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 8 |
10 files changed, 39 insertions, 25 deletions
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 881be49..758f3b5 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94 * - * $Id: fdesc_vfsops.c,v 1.16 1998/09/07 13:17:00 bde Exp $ + * $Id: fdesc_vfsops.c,v 1.17 1999/01/12 11:49:30 eivind Exp $ */ /* @@ -138,7 +138,7 @@ fdesc_unmount(mp, mntflags, p) */ if (rootvp->v_usecount > 1) return (EBUSY); - if (error = vflush(mp, rootvp, flags)) + if ((error = vflush(mp, rootvp, flags)) != 0) return (error); /* diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index fb8f4a1..6bdea5f 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * - * $Id: fdesc_vnops.c,v 1.39 1998/12/07 21:58:31 archie Exp $ + * $Id: fdesc_vnops.c,v 1.40 1998/12/14 05:00:57 dillon Exp $ */ /* @@ -283,7 +283,7 @@ fdesc_lookup(ap) case Fdevfd: if (cnp->cn_namelen == 2 && bcmp(pname, "..", 2) == 0) { - if (error = fdesc_root(dvp->v_mount, vpp)) + if ((error = fdesc_root(dvp->v_mount, vpp)) != 0) goto bad; return (0); } diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index b3a63b5..bca552c 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vfsops.c,v 1.38 1998/10/31 15:31:24 peter Exp $ */ +/* $Id: msdosfs_vfsops.c,v 1.39 1998/12/07 21:58:35 archie Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -911,9 +911,9 @@ loop: nvp = vp->v_mntvnodes.le_next; dep = VTODE(vp); if (vp->v_type == VNON || - (dep->de_flag & + ((dep->de_flag & (DE_ACCESS | DE_CREATE | DE_UPDATE | DE_MODIFIED)) == 0 && - (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY)) { + (TAILQ_EMPTY(&vp->v_dirtyblkhd) || waitfor == MNT_LAZY))) { simple_unlock(&vp->v_interlock); continue; } diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index aad4e6b..36aa91d 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.79 1998/11/29 22:38:57 dt Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.80 1998/12/07 21:58:35 archie Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */ /*- @@ -278,6 +278,8 @@ msdosfs_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } } @@ -485,11 +487,14 @@ msdosfs_setattr(ap) switch (vp->v_type) { case VDIR: return (EISDIR); + /* NOT REACHED */ case VLNK: case VREG: if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } error = detrunc(dep, vap->va_size, 0, cred, ap->a_p); if (error) diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index b2e1b63..514ba82 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -37,11 +37,11 @@ * * Ancestors: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vnops.c,v 1.29 1998/07/04 20:45:33 julian Exp $ + * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project * - * $Id: null_vnops.c,v 1.29 1998/07/04 20:45:33 julian Exp $ + * $Id: null_vnops.c,v 1.30 1998/12/07 21:58:32 archie Exp $ */ /* @@ -484,6 +484,8 @@ null_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); break; + default: + break; } } return (null_bypass((struct vop_generic_args *)ap)); diff --git a/sys/fs/procfs/procfs_subr.c b/sys/fs/procfs/procfs_subr.c index 813232c..98e3687 100644 --- a/sys/fs/procfs/procfs_subr.c +++ b/sys/fs/procfs/procfs_subr.c @@ -36,7 +36,7 @@ * * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95 * - * $Id: procfs_subr.c,v 1.21 1997/12/12 03:33:43 sef Exp $ + * $Id: procfs_subr.c,v 1.22 1999/01/05 03:53:06 peter Exp $ */ #include <sys/param.h> @@ -119,7 +119,7 @@ loop: */ MALLOC(pfs, struct pfsnode *, sizeof(struct pfsnode), M_TEMP, M_WAITOK); - if (error = getnewvnode(VT_PROCFS, mp, procfs_vnodeop_p, vpp)) { + if ((error = getnewvnode(VT_PROCFS, mp, procfs_vnodeop_p, vpp)) != 0) { FREE(pfs, M_TEMP); goto out; } @@ -327,7 +327,7 @@ vfs_getuserstr(uio, buf, buflenp) return (EMSGSIZE); xlen = uio->uio_resid; - if (error = uiomove(buf, xlen, uio)) + if ((error = uiomove(buf, xlen, uio)) != 0) return (error); /* allow multiple writes without seeks */ diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index daab08f..1aa5453 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.62 1998/12/04 22:54:51 archie Exp $ + * $Id: procfs_vnops.c,v 1.63 1999/01/05 03:53:06 peter Exp $ */ /* @@ -137,8 +137,8 @@ procfs_open(ap) switch (pfs->pfs_type) { case Pmem: - if ((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL) || - (pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE)) + if (((pfs->pfs_flags & FWRITE) && (ap->a_mode & O_EXCL)) || + ((pfs->pfs_flags & O_EXCL) && (ap->a_mode & FWRITE))) return (EBUSY); p1 = ap->a_p; @@ -285,7 +285,7 @@ procfs_ioctl(ap) case PIOCCONT: /* Restart a proc */ if (procp->p_step == 0) return EINVAL; /* Can only start a stopped process */ - if (signo = *(int*)ap->a_data) { + if ((signo = *(int*)ap->a_data) != 0) { if (signo >= NSIG || signo <= 0) return EINVAL; psignal(procp, signo); @@ -847,7 +847,7 @@ procfs_readdir(ap) bcopy(pt->pt_name, dp->d_name, pt->pt_namlen + 1); dp->d_type = pt->pt_type; - if (error = uiomove((caddr_t)dp, UIO_MX, uio)) + if ((error = uiomove((caddr_t)dp, UIO_MX, uio)) != 0) break; } @@ -906,7 +906,7 @@ procfs_readdir(ap) break; } - if (error = uiomove((caddr_t)dp, UIO_MX, uio)) + if ((error = uiomove((caddr_t)dp, UIO_MX, uio)) != 0) break; } done: diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 6096a1b..88290e4 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.78 1998/12/16 00:10:51 eivind Exp $ + * $Id: spec_vnops.c,v 1.79 1999/01/21 08:29:07 dillon Exp $ */ #include <sys/param.h> @@ -210,7 +210,7 @@ spec_open(ap) error = (*cdevsw[maj]->d_open)(dev, ap->a_mode, S_IFCHR, p); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); return (error); - + /* NOT REACHED */ case VBLK: if ((u_int)maj >= nblkdev) return (ENXIO); @@ -233,6 +233,9 @@ spec_open(ap) if (error) return (error); return ((*bdevsw[maj]->d_open)(dev, ap->a_mode, S_IFBLK, p)); + /* NOT REACHED */ + default: + break; } return (0); } diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index fb700cc..db4d4d3 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95 - * $Id: union_vfsops.c,v 1.29 1998/05/06 05:29:37 msmith Exp $ + * $Id: union_vfsops.c,v 1.30 1998/09/07 13:17:02 bde Exp $ */ /* @@ -325,7 +325,7 @@ union_unmount(mp, mntflags, p) if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - if (error = union_root(mp, &um_rootvp)) + if ((error = union_root(mp, &um_rootvp)) != 0) return (error); /* diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 87fda6d..ba9b2a3 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.58 1998/07/04 20:45:35 julian Exp $ + * $Id: union_vnops.c,v 1.59 1998/12/14 05:00:59 dillon Exp $ */ #include <sys/param.h> @@ -695,8 +695,12 @@ union_access(ap) */ if (ap->a_mode & VWRITE && (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)) { switch (ap->a_vp->v_type) { - case VREG: case VDIR: case VLNK: + case VREG: + case VDIR: + case VLNK: return (EROFS); + default: + break; } } if ((vp = un->un_uppervp) != NULLVP) { |