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: <4717BBD0.7070504@qumranet.com>
Date:	Thu, 18 Oct 2007 22:02:24 +0200
From:	Avi Kivity <avi@...ranet.com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Andy Whitcroft <apw@...dowen.org>, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: latest checkpatch

Ingo Molnar wrote:
> * Andy Whitcroft <apw@...dowen.org> wrote:
>
>   
>>> it's perfectly legitimate, in fact more robust. So if checkpatch.pl 
>>> wants to make any noise about such constructs it should warn about 
>>> the _lack_ of curly braces in every multi-line condition block 
>>> _except_ the only safe single-line statement:
>>>
>>> 	if (x)
>>> 		y();
>>>       
>> Indeed.  We should probabally do more on the indentation checks in
>> general.  The current direct check for:
>>
>> 	if (foo);
>> 		bar();
>>
>> Could probabally be generalised to look for this kind of error:
>>
>> 	if (foo)
>> 		bar();
>> 		baz();
>> 	one();
>>     
>
> detecting that would be awesome - it's often the sign of a real bug 
> because the intent is often to have bar() and baz() in the conditional 
> block.
>
>   

This is more useful operating on an entire file, so the script can see
all the context.

A 'gcc -Windentation-contradicts-codeflow -Werror' would be nice.


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ