Skip to content

Commit

Permalink
fstat(1): Raise WARNS to 6 and fix all warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Wildner committed Jan 28, 2011
1 parent 78f841a commit 95d7b08
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions usr.bin/fstat/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD: src/usr.bin/fstat/Makefile,v 1.4.2.1 2000/07/02 10:20:24 ps Exp $
# $DragonFly: src/usr.bin/fstat/Makefile,v 1.5 2008/11/03 00:25:45 pavalos Exp $

PROG= fstat
SRCS= cd9660.c fstat.c msdosfs.c
Expand All @@ -9,6 +8,5 @@ DPADD= ${LIBKVM}
LDADD= -lkvm
BINGRP= kmem
BINMODE=2555
WARNS?= 0

.include <bsd.prog.mk>
5 changes: 1 addition & 4 deletions usr.bin/fstat/cd9660.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/fstat/cd9660.c,v 1.1.2.3 2001/11/21 10:49:37 dwmalone Exp $
* $DragonFly: src/usr.bin/fstat/cd9660.c,v 1.6 2006/04/25 16:37:44 dillon Exp $
*/

/*
Expand Down Expand Up @@ -68,10 +67,8 @@ isofs_filestat(struct vnode *vp, struct filestat *fsp)
(void *)VTOI(vp), Pid);
return 0;
}
fsp->fsid = dev2udev(isonode.i_dev);
fsp->fsid = fsp->rdev = dev2udev(isonode.i_dev);
fsp->mode = (mode_t)isonode.inode.iso_mode;
fsp->rdev = isonode.i_dev;

fsp->fileid = (long)isonode.i_number;
fsp->size = isonode.i_size;
return 1;
Expand Down
4 changes: 3 additions & 1 deletion usr.bin/fstat/fstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ main(int argc, char **argv)
exit(0);
}

char *Uname, *Comm;
const char *Uname;
char *Comm;
int Pid;

#define PREFIX(i) \
Expand Down Expand Up @@ -628,6 +629,7 @@ nfs_filestat(struct vnode *vp, struct filestat *fsp)
break;
case VDATABASE:
break;
case VINT:
case VNON:
case VBAD:
return 0;
Expand Down
4 changes: 1 addition & 3 deletions usr.bin/fstat/msdosfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/fstat/msdosfs.c,v 1.1.2.2 2001/11/21 10:49:37 dwmalone Exp $
* $DragonFly: src/usr.bin/fstat/msdosfs.c,v 1.7 2006/04/25 16:37:44 dillon Exp $
*/

#define _KERNEL_STRUCTURES
Expand Down Expand Up @@ -109,7 +108,7 @@ msdosfs_filestat(struct vnode *vp, struct filestat *fsp)
}
}

fsp->fsid = dev2udev(denode.de_dev);
fsp->fsid = fsp->rdev = dev2udev(denode.de_dev);
fsp->mode = 0555;
fsp->mode |= denode.de_Attributes & ATTR_READONLY ? 0 : 0222;
fsp->mode &= mnt->data.pm_mask;
Expand All @@ -118,7 +117,6 @@ msdosfs_filestat(struct vnode *vp, struct filestat *fsp)
fsp->mode |= denode.de_Attributes & ATTR_DIRECTORY ? S_IFDIR : S_IFREG;

fsp->size = denode.de_FileSize;
fsp->rdev = denode.de_dev;

/*
* XXX -
Expand Down

0 comments on commit 95d7b08

Please sign in to comment.