diff --git a/usr.sbin/makefs/Makefile b/usr.sbin/makefs/Makefile index cbe4f497d7d..3fea648f938 100644 --- a/usr.sbin/makefs/Makefile +++ b/usr.sbin/makefs/Makefile @@ -16,7 +16,7 @@ SRCS= cd9660.c \ walk.c MAN= makefs.8 -WARNS?= 2 +NO_WCAST_ALIGN= CSTD= c11 .include "${SRCDIR}/cd9660/Makefile.inc" diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index 9cfbcbc30d7..1e68b0931f1 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -578,7 +578,7 @@ ffs_create_image(const char *image, fsinfo_t *fsopts) (long long)fs->fs_cstotal.cs_ndir); } - if (fs->fs_cstotal.cs_nifree + UFS_ROOTINO < fsopts->inodes) { + if (fs->fs_cstotal.cs_nifree + (off_t)UFS_ROOTINO < fsopts->inodes) { warnx( "Image file `%s' has %lld free inodes; %lld are required.", image, diff --git a/usr.sbin/makefs/msdos/msdosfs_denode.c b/usr.sbin/makefs/msdos/msdosfs_denode.c index 3fbd867275d..ff706ad9956 100644 --- a/usr.sbin/makefs/msdos/msdosfs_denode.c +++ b/usr.sbin/makefs/msdos/msdosfs_denode.c @@ -210,7 +210,6 @@ int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) { int error; - int allerror; u_long eofentry; u_long chaintofree; daddr_t bn; @@ -253,7 +252,7 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) if (length == 0) { chaintofree = dep->de_StartCluster; dep->de_StartCluster = 0; - eofentry = ~0; + eofentry = ~0ul; } else { error = pcbmap(dep, de_clcount(pmp, length) - 1, 0, &eofentry, 0); @@ -295,14 +294,13 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) dep->de_FileSize = length; if (!isadir) dep->de_flag |= DE_UPDATE|DE_MODIFIED; - MSDOSFS_DPRINTF(("detrunc(): allerror %d, eofentry %lu\n", - allerror, eofentry)); + MSDOSFS_DPRINTF(("detrunc(): eofentry %lu\n", eofentry)); /* * If we need to break the cluster chain for the file then do it * now. */ - if (eofentry != ~0) { + if (eofentry != ~0ul) { error = fatentry(FAT_GET_AND_SET, pmp, eofentry, &chaintofree, CLUST_EOFE); if (error) { @@ -321,7 +319,7 @@ detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) if (chaintofree != 0 && !MSDOSFSEOF(pmp, chaintofree)) freeclusterchain(pmp, chaintofree); - return (allerror); + return (0); } /* diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index ed33856716f..5bc9b495c58 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -537,7 +537,8 @@ static const struct { }; struct denode * -msdosfs_mkdire(const char *path, struct denode *pdep, fsnode *node) { +msdosfs_mkdire(const char *path __unused, struct denode *pdep, fsnode *node) +{ struct denode ndirent; struct denode *dep; struct componentname cn;