Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2018 18:51:44 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        rgrimes@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:  <20181117235144.GA2799@raichu>
In-Reply-To: <201811172347.wAHNlGi6053535@pdx.rh.CN85.dnsmgr.net>
References:  <201811172001.wAHK1aR7047919@repo.freebsd.org> <201811172347.wAHNlGi6053535@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 17, 2018 at 03:47:16PM -0800, Rodney W. Grimes wrote:
> > 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 */ ??

The statement following "case '\0':" is a break.

> 
> >  	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?

No, it isn't.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181117235144.GA2799>