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]
Message-ID: <a5b310a1-d0ba-689b-100a-14a8204761a8@embeddedor.com>
Date:   Wed, 20 Mar 2019 15:19:12 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Joern Engel <joern@...ybastard.org>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Boris Brezillon <bbrezillon@...nel.org>,
        Marek Vasut <marek.vasut@...il.com>,
        Richard Weinberger <richard@....at>
Cc:     linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] mtd: phram: Mark expected switch fall-throughs

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

On 2/8/19 12:09 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
> 
> This patch fixes the following warnings:
> 
> drivers/mtd/devices/phram.c: In function ‘parse_num64’:
> drivers/mtd/devices/phram.c:149:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
>      shift += 10;
>      ~~~~~~^~~~~
> drivers/mtd/devices/phram.c:150:4: note: here
>     case 'M':
>     ^~~~
> drivers/mtd/devices/phram.c:151:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
>      shift += 10;
>      ~~~~~~^~~~~
> drivers/mtd/devices/phram.c:152:4: note: here
>     case 'k':
>     ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This patch is part of the ongoing efforts to enabling
> -Wimplicit-fallthrough.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> ---
>  drivers/mtd/devices/phram.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
> index 9ee04b5f9311..8a8627c30aed 100644
> --- a/drivers/mtd/devices/phram.c
> +++ b/drivers/mtd/devices/phram.c
> @@ -147,8 +147,10 @@ static int parse_num64(uint64_t *num64, char *token)
>  			switch (token[len - 2]) {
>  			case 'G':
>  				shift += 10;
> +				/* fall through */
>  			case 'M':
>  				shift += 10;
> +				/* fall through */
>  			case 'k':
>  				shift += 10;
>  				token[len - 2] = 0;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ