xfs
[Top] [All Lists]

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

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] mkfs.xfs: annotate fallthrough cases in cvtnum
From: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Date: Thu, 12 May 2016 15:59:29 +0200
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <51117671-6856-0fb7-d86e-0fdf6a29b5e5@xxxxxxxxxxx>
Mail-followup-to: xfs@xxxxxxxxxxx
References: <51117671-6856-0fb7-d86e-0fdf6a29b5e5@xxxxxxxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
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@xxxxxxxxxx>

> Addresses-Coverity-ID: 1361553
> Addresses-Coverity-ID: 1361554
> Addresses-Coverity-ID: 1361555
> Addresses-Coverity-ID: 1361556
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
> 
> 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@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos

<Prev in Thread] Current Thread [Next in Thread>