aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-11-21 17:31:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-21 19:42:27 -0500
commitc11230f44b3c3e055e4e7cd572fc1c4a22c6f4a9 (patch)
treec6181aa0d144506cc0e08147b3ed6a60d8ff06f5 /scripts
parent76ae281f6307331aa063288edb6422ae99f435f0 (diff)
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 61090e0ff613..9c9810030377 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3289,6 +3289,7 @@ sub process {
3289 } 3289 }
3290 } 3290 }
3291 if (!defined $suppress_whiletrailers{$linenr} && 3291 if (!defined $suppress_whiletrailers{$linenr} &&
3292 defined($stat) && defined($cond) &&
3292 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) { 3293 $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) {
3293 my ($s, $c) = ($stat, $cond); 3294 my ($s, $c) = ($stat, $cond);
3294 3295