lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 Jan 2019 10:40:16 -0700
From:   Andreas Dilger <adilger@...ger.ca>
To:     Mathieu Malaterre <malat@...ian.org>
Cc:     Theodore Ts'o <tytso@....edu>,
        Ext4 Developers List <linux-ext4@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] ext4: annotate implicit fall throughs


> On Jan 14, 2019, at 1:39 PM, Mathieu Malaterre <malat@...ian.org> wrote:
> 
> There is a plan to build the kernel with -Wimplicit-fallthrough and
> these places in the code produced warnings (W=1). Fix them up.
> 
> This commit remove the following warnings:
> 
>  fs/ext4/indirect.c:1182:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>  fs/ext4/indirect.c:1188:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>  fs/ext4/indirect.c:1432:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>  fs/ext4/indirect.c:1440:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Mathieu Malaterre <malat@...ian.org>

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

> ---
> fs/ext4/indirect.c | 6 ++++++
> 1 file changed, 6 insertions(+)
> 
> diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
> index bf7fa1507e81..c2225f0d31b5 100644
> --- a/fs/ext4/indirect.c
> +++ b/fs/ext4/indirect.c
> @@ -1183,18 +1183,21 @@ void ext4_ind_truncate(handle_t *handle, struct inode *inode)
> 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
> 			i_data[EXT4_IND_BLOCK] = 0;
> 		}
> +		/* fall through */
> 	case EXT4_IND_BLOCK:
> 		nr = i_data[EXT4_DIND_BLOCK];
> 		if (nr) {
> 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
> 			i_data[EXT4_DIND_BLOCK] = 0;
> 		}
> +		/* fall through */
> 	case EXT4_DIND_BLOCK:
> 		nr = i_data[EXT4_TIND_BLOCK];
> 		if (nr) {
> 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
> 			i_data[EXT4_TIND_BLOCK] = 0;
> 		}
> +		/* fall through */
> 	case EXT4_TIND_BLOCK:
> 		;
> 	}
> @@ -1433,6 +1436,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
> 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
> 			i_data[EXT4_IND_BLOCK] = 0;
> 		}
> +		/* fall through */
> 	case EXT4_IND_BLOCK:
> 		if (++n >= n2)
> 			return 0;
> @@ -1441,6 +1445,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
> 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
> 			i_data[EXT4_DIND_BLOCK] = 0;
> 		}
> +		/* fall through */
> 	case EXT4_DIND_BLOCK:
> 		if (++n >= n2)
> 			return 0;
> @@ -1449,6 +1454,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
> 			ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
> 			i_data[EXT4_TIND_BLOCK] = 0;
> 		}
> +		/* fall through */
> 	case EXT4_TIND_BLOCK:
> 		;
> 	}
> --
> 2.19.2
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists