From owner-svn-src-all@freebsd.org Sun Jun 24 05:40:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E728D1019248; Sun, 24 Jun 2018 05:40:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95D6F7A806; Sun, 24 Jun 2018 05:40:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 771E41A7E8; Sun, 24 Jun 2018 05:40:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5O5eham099180; Sun, 24 Jun 2018 05:40:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5O5eh5k099179; Sun, 24 Jun 2018 05:40:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806240540.w5O5eh5k099179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 24 Jun 2018 05:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335597 - head/sbin/newfs X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/newfs X-SVN-Commit-Revision: 335597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2018 05:40:44 -0000 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",