- Remove (void) casts - Make WARNS?= 6 clean - Add WARNS?= 6 Index: src/sbin/mdmfs/mdmfs.c =================================================================== --- src/sbin/mdmfs/mdmfs.c (revision 106) +++ src/sbin/mdmfs/mdmfs.c (revision 107) @@ -97,11 +97,12 @@ void *set; /* Misc. initialization. */ - (void)memset(&mi, '\0', sizeof(mi)); + memset(&mi, '\0', sizeof(mi)); detach = true; softdep = true; autounit = false; have_mdtype = false; + mdtype = MD_SWAP; mdname = MD_NAME; mdnamelen = strlen(mdname); /* @@ -257,13 +258,11 @@ 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); } mtpoint = argv[1]; - if (!have_mdtype) - mdtype = MD_SWAP; if (softdep) argappend(&newfs_arg, "-U"); @@ -405,7 +404,7 @@ 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); @@ -610,11 +609,11 @@ * and the latter for the would-be call inside the * loop. */ - (void)fprintf(stderr, "DEBUG: running:"); + fprintf(stderr, "DEBUG: running:"); /* Should be equivilent to 'cmd' (before strsep, of course). */ for (i = 0; argv[i] != NULL; i++) - (void)fprintf(stderr, " %s", argv[i]); - (void)fprintf(stderr, "\n"); + fprintf(stderr, " %s", argv[i]); + fprintf(stderr, "\n"); } /* Create a pipe if necessary and fork the helper program. */ @@ -646,7 +645,7 @@ err(1, "dup2"); } - (void)execv(argv[0], argv); + execv(argv[0], argv); warn("exec: %s", argv[0]); _exit(-1); case -1: Index: src/sbin/mdmfs/Makefile =================================================================== --- src/sbin/mdmfs/Makefile (revision 106) +++ src/sbin/mdmfs/Makefile (revision 107) @@ -4,5 +4,6 @@ LINKS= ${BINDIR}/${PROG} ${BINDIR}/mount_mfs MAN= mdmfs.8 MLINKS+= mdmfs.8 mount_mfs.8 +WARNS?= 6 .include