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: <20120502153212.GE3364@shadowen.org>
Date:	Wed, 2 May 2012 16:32:12 +0100
From:	Andy Whitcroft <apw@...onical.com>
To:	Joe Korty <joe.korty@...r.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: checkpatch: brackets around single statements fix

On Wed, May 02, 2012 at 11:10:46AM -0400, Joe Korty wrote:
> Checkpatch thinks '#else' is the same as 'else' in its check for
> this error:
> 
>    WARNING: braces {} are not necessary for single statement blocks
> 
> Signed-off-by: Joe Korty <joe.korty@...r.com>
> 
> Index: linux/scripts/checkpatch.pl
> ===================================================================
> --- linux.orig/scripts/checkpatch.pl	2012-04-17 05:00:37.000000000 -0400
> +++ linux/scripts/checkpatch.pl	2012-05-02 10:29:03.000000000 -0400
> @@ -3038,7 +3038,7 @@
>  			}
>  		}
>  		if (!defined $suppress_ifbraces{$linenr - 1} &&
> -					$line =~ /\b(if|while|for|else)\b/) {
> +					$line =~ /[^#]\b(if|while|for|else)\b/) {
>  			my $allowed = 0;
>  
>  			# Check the pre-context.

Interesting.  Got an example I can use to add to the test suite.

-apw
--
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