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] [day] [month] [year] [list]
Message-ID: <20181210004217.ufzvj4rvykiqoufd@ltop.local>
Date:   Mon, 10 Dec 2018 01:42:18 +0100
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Joe Perches <joe@...ches.com>,
        Thomas Jespersen <laumann.thomas@...il.com>,
        gaoxiang25@...wei.com, yuchao0@...wei.com,
        linux-erofs@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: erofs: Add braces to do-while statements

On Sun, Dec 09, 2018 at 08:40:29PM +0100, Greg KH wrote:
> On Sun, Dec 09, 2018 at 09:27:01AM -0800, Joe Perches wrote:
> > On Sun, 2018-12-09 at 17:20 +0100, Greg KH wrote:
> > > On Sun, Dec 09, 2018 at 04:59:00PM +0100, Thomas Jespersen wrote:
> > > > This fixes warning reported by sparse (with -Wsparse-all).
> > > 
> > > Why is sparse warning about this?
> > 
> > Probably because it's the kernel preferred style
> > to use single statement
> > 
> > 	do {
> > 		<foo>;
> > 	} while (<bar>);
> > 
> > over
> > 
> > by about a 20:1 ratio.
> 
> Sparse is spitting out coding style complaints now?

To my own surprise, it's effectively sparse that complained:
	warning: do-while statement is not a compound statement

with the flag -Wsparse-all (or -Wdo-while).
But -Wsparse-all is not a flag normally used for the kernel
(or normaly used on anything at all).

-- Luc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ