From 4b3dd106e6bbe8f7f973611eaf5db5533aef8a9d Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Sun, 24 Jun 2018 05:40:42 +0000 Subject: [PATCH] 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 --- sbin/newfs/newfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 30ea9e53396a..472b740d385b 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -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 disksize, intmax_t reserved) } 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",