Commit c11230f4 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: fix "Use of uninitialized value" warnings

checkpatch is currently confused about some complex macros and references
undefined variables $stat and $cond.

Make sure these are defined before using them.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarGerhard Sittig <gsi@denx.de>
Acked-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 76ae281f
...@@ -3289,6 +3289,7 @@ sub process { ...@@ -3289,6 +3289,7 @@ sub process {
} }
} }
if (!defined $suppress_whiletrailers{$linenr} && if (!defined $suppress_whiletrailers{$linenr} &&
defined($stat) && defined($cond) &&
$line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) { $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
my ($s, $c) = ($stat, $cond); my ($s, $c) = ($stat, $cond);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment