summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/mdmfs/Makefile1
-rw-r--r--sbin/mdmfs/mdmfs.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/sbin/mdmfs/Makefile b/sbin/mdmfs/Makefile
index 999793f..1ef7084 100644
--- a/sbin/mdmfs/Makefile
+++ b/sbin/mdmfs/Makefile
@@ -4,5 +4,6 @@ PROG= mdmfs
LINKS= ${BINDIR}/${PROG} ${BINDIR}/mount_mfs
MAN= mdmfs.8
MLINKS+= mdmfs.8 mount_mfs.8
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index bed6dc7..d276dc0 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -101,6 +101,7 @@ main(int argc, char **argv)
softdep = true;
autounit = false;
have_mdtype = false;
+ mdtype = MD_SWAP;
mdname = MD_NAME;
mdnamelen = strlen(mdname);
/*
@@ -251,7 +252,7 @@ main(int argc, char **argv)
unit = -1;
} else {
unit = strtoul(unitstr, &p, 10);
- if (unit == (unsigned)ULONG_MAX || *p != '\0')
+ if ((unsigned)unit == (unsigned)ULONG_MAX || *p != '\0')
errx(1, "bad device unit: %s", unitstr);
}
@@ -399,7 +400,7 @@ do_mdconfig_attach_au(const char *args, const enum md_types mdtype)
strncpy(linebuf, linep + mdnamelen, linelen);
linebuf[linelen] = '\0';
unit = strtoul(linebuf, &p, 10);
- if (unit == (unsigned)ULONG_MAX || *p != '\n')
+ if ((unsigned)unit == (unsigned)ULONG_MAX || *p != '\n')
errx(1, "unexpected output from mdconfig (attach)");
fclose(sfd);
OpenPOWER on IntegriCloud