* [Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #else
@ 2011-01-21 17:19 Jan Kiszka
2011-01-21 17:35 ` [Qemu-devel] " Blue Swirl
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2011-01-21 17:19 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
scripts/checkpatch.pl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 55ef439..4fa06c0 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2536,7 +2536,8 @@ sub process {
}
}
if (!defined $suppress_ifbraces{$linenr - 1} &&
- $line =~ /\b(if|while|for|else)\b/) {
+ $line =~ /\b(if|while|for|else)\b/ &&
+ $line !~ /\#\s*else/) {
my $allowed = 0;
# Check the pre-context.
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] checkpatch: Fix bracing false positives on #else
2011-01-21 17:19 [Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #else Jan Kiszka
@ 2011-01-21 17:35 ` Blue Swirl
0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2011-01-21 17:35 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-devel
Thanks, applied.
On Fri, Jan 21, 2011 at 5:19 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> scripts/checkpatch.pl | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 55ef439..4fa06c0 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2536,7 +2536,8 @@ sub process {
> }
> }
> if (!defined $suppress_ifbraces{$linenr - 1} &&
> - $line =~ /\b(if|while|for|else)\b/) {
> + $line =~ /\b(if|while|for|else)\b/ &&
> + $line !~ /\#\s*else/) {
> my $allowed = 0;
>
> # Check the pre-context.
> --
> 1.7.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-21 17:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-21 17:19 [Qemu-devel] [PATCH] checkpatch: Fix bracing false positives on #else Jan Kiszka
2011-01-21 17:35 ` [Qemu-devel] " Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).