Author: eadler
Date: Sun Jun 24 05:40:42 2018
New Revision: 335597
URL: https://svnweb.freebsd.org/changeset/base/335597

Log:
  newfs: clean up warnings
  
  - remove param: unused since r95357.
  - correct definition of usage
  - add explicit fallthrough notice. The existing one doesn't work with
  our selection of "implicit-fallthrough" strictness.
  
  This results in WARNS=6 building on amd64, but not other arches

Modified:
  head/sbin/newfs/newfs.c

Modified: head/sbin/newfs/newfs.c
==============================================================================
--- head/sbin/newfs/newfs.c     Sun Jun 24 03:31:23 2018        (r335596)
+++ head/sbin/newfs/newfs.c     Sun Jun 24 05:40:42 2018        (r335597)
@@ -121,7 +121,7 @@ static char *dkname;
 static char    *disktype;
 
 static void getfssize(intmax_t *, const char *p, intmax_t, intmax_t);
-static struct disklabel *getdisklabel(char *s);
+static struct disklabel *getdisklabel(void);
 static void usage(void);
 static int expand_number_int(const char *buf, int *num);
 
@@ -185,6 +185,7 @@ main(int argc, char *argv[])
                case 'j':
                        jflag = 1;
                        /* fall through to enable soft updates */
+                       /* FALLTHROUGH */
                case 'U':
                        Uflag = 1;
                        break;
@@ -351,7 +352,7 @@ main(int argc, char *argv[])
                getfssize(&fssize, special, mediasize / sectorsize, reserved);
        }
        pp = NULL;
-       lp = getdisklabel(special);
+       lp = getdisklabel();
        if (lp != NULL) {
                if (!is_file) /* already set for files */
                        part_name = special[strlen(special) - 1];
@@ -426,7 +427,7 @@ getfssize(intmax_t *fsz, const char *s, intmax_t disks
 }
 
 struct disklabel *
-getdisklabel(char *s)
+getdisklabel(void)
 {
        static struct disklabel lab;
        struct disklabel *lp;
@@ -453,7 +454,7 @@ getdisklabel(char *s)
 }
 
 static void
-usage()
+usage(void)
 {
        fprintf(stderr,
            "usage: %s [ -fsoptions ] special-device%s\n",
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to