[PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum

Carlos Maiolino cmaiolino at redhat.com
Thu May 12 08:59:29 CDT 2016


On Wed, May 11, 2016 at 09:47:45PM -0500, Eric Sandeen wrote:
> We should really collapse our 3 cvtnum variants,
> but for now at least shut up Coverity about this
> intentional case fallthrough.
> 

Looks good

Reviewed-by: Carlos Maiolino <cmaiolino at redhat.com>

> Addresses-Coverity-ID: 1361553
> Addresses-Coverity-ID: 1361554
> Addresses-Coverity-ID: 1361555
> Addresses-Coverity-ID: 1361556
> Signed-off-by: Eric Sandeen <sandeen at redhat.com>
> ---
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 955dcfd..12fe8f3 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -3623,14 +3623,19 @@ cvtnum(
>  	switch (c) {
>  	case 'e':
>  		i *= 1024LL;
> +		/* fall through */
>  	case 'p':
>  		i *= 1024LL;
> +		/* fall through */
>  	case 't':
>  		i *= 1024LL;
> +		/* fall through */
>  	case 'g':
>  		i *= 1024LL;
> +		/* fall through */
>  	case 'm':
>  		i *= 1024LL;
> +		/* fall through */
>  	case 'k':
>  		return i * 1024LL;
>  	default:
> 
> _______________________________________________
> xfs mailing list
> xfs at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos



More information about the xfs mailing list