Date: Sat, 17 Nov 2018 15:47:16 -0800 (PST) From: "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net> To: Mark Johnston <markj@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r340511 - stable/12/sys/kern Message-ID: <201811172347.wAHNlGi6053535@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201811172001.wAHK1aR7047919@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Author: markj > Date: Sat Nov 17 20:01:35 2018 > New Revision: 340511 > URL: https://svnweb.freebsd.org/changeset/base/340511 > > Log: > MFC r339731: > Add FALLTHROUGH comments to appease Coverity. > > Modified: > stable/12/sys/kern/kern_environment.c > stable/12/sys/kern/vfs_mount.c > Directory Properties: > stable/12/ (props changed) > > Modified: stable/12/sys/kern/kern_environment.c > ============================================================================== > --- stable/12/sys/kern/kern_environment.c Sat Nov 17 20:00:10 2018 (r340510) > +++ stable/12/sys/kern/kern_environment.c Sat Nov 17 20:01:35 2018 (r340511) > @@ -839,10 +839,13 @@ getenv_quad(const char *name, quad_t *data) > switch (vtp[0]) { > case 't': case 'T': > iv *= 1024; > + /* FALLTHROUGH */ > case 'g': case 'G': > iv *= 1024; > + /* FALLTHROUGH */ > case 'm': case 'M': > iv *= 1024; > + /* FALLTHROUGH */ > case 'k': case 'K': > iv *= 1024; Missing /* FALLTHROUGH */ ?? > case '\0': And a refactor: case 't': case 'T': case 'g': case 'G': case 'm': case 'M': case 'k': case 'K': iv *= 1024; /* FALLTHROUGH */ case '\0': Isnt that the same functionality? > > Modified: stable/12/sys/kern/vfs_mount.c > ============================================================================== > --- stable/12/sys/kern/vfs_mount.c Sat Nov 17 20:00:10 2018 (r340510) > +++ stable/12/sys/kern/vfs_mount.c Sat Nov 17 20:01:35 2018 (r340511) > @@ -1643,17 +1643,16 @@ vfs_getopt_size(struct vfsoptlist *opts, const char *n > if (iv < 0) > return (EINVAL); > switch (vtp[0]) { > - case 't': > - case 'T': > + case 't': case 'T': > iv *= 1024; > - case 'g': > - case 'G': > + /* FALLTHROUGH */ > + case 'g': case 'G': > iv *= 1024; > - case 'm': > - case 'M': > + /* FALLTHROUGH */ > + case 'm': case 'M': > iv *= 1024; > - case 'k': > - case 'K': > + /* FALLTHROUGH */ > + case 'k': case 'K': > iv *= 1024; > case '\0': > break; > Similiar here. -- Rod Grimes rgrimes@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811172347.wAHNlGi6053535>