From f2bccf4766a1a2af94bda914f491835a019349cd Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Mon, 21 Nov 2005 22:51:16 +0000 Subject: [PATCH] Bring mount_nullfs up to WARNS=6. --- sbin/mount_nullfs/Makefile | 2 +- sbin/mount_nullfs/mount_nullfs.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sbin/mount_nullfs/Makefile b/sbin/mount_nullfs/Makefile index 9a6be28a960c..5e92c5b5c264 100644 --- a/sbin/mount_nullfs/Makefile +++ b/sbin/mount_nullfs/Makefile @@ -7,7 +7,7 @@ MAN= mount_nullfs.8 MOUNT= ${.CURDIR}/../mount CFLAGS+=-I${MOUNT} -WARNS?= 0 +WARNS?= 6 .PATH: ${MOUNT} diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c index 410562469172..a0ad5f681908 100644 --- a/sbin/mount_nullfs/mount_nullfs.c +++ b/sbin/mount_nullfs/mount_nullfs.c @@ -66,9 +66,7 @@ int subdir(const char *, const char *); static void usage(void) __dead2; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct iovec iov[6]; int ch, mntflags; @@ -99,15 +97,15 @@ main(argc, argv) errx(EX_USAGE, "%s (%s) and %s are not distinct paths", argv[0], target, argv[1]); - iov[0].iov_base = "fstype"; + iov[0].iov_base = strdup("fstype"); iov[0].iov_len = sizeof("fstype"); - iov[1].iov_base = "nullfs"; + iov[1].iov_base = strdup("nullfs"); iov[1].iov_len = strlen(iov[1].iov_base) + 1; - iov[2].iov_base = "fspath"; + iov[2].iov_base = strdup("fspath"); iov[2].iov_len = sizeof("fspath"); iov[3].iov_base = source; iov[3].iov_len = strlen(source) + 1; - iov[4].iov_base = "target"; + iov[4].iov_base = strdup("target"); iov[4].iov_len = sizeof("target"); iov[5].iov_base = target; iov[5].iov_len = strlen(target) + 1;