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: Joe Perches <joe@perches.com> Reported-by: Gerhard Sittig <gsi@denx.de> Acked-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
76ae281f63
commit
c11230f44b
1 changed files with 1 additions and 0 deletions
|
@ -3289,6 +3289,7 @@ sub process {
|
|||
}
|
||||
}
|
||||
if (!defined $suppress_whiletrailers{$linenr} &&
|
||||
defined($stat) && defined($cond) &&
|
||||
$line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
|
||||
my ($s, $c) = ($stat, $cond);
|
||||
|
||||
|
|
Loading…
Reference in a new issue