From: Randy Dunlap Date: Thu, 7 Jul 2005 22:39:26 +0000 (-0700) Subject: [PATCH] scripts/kernel-doc: don't use uninitialized SRCTREE X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2283a117f65650352f2a9fd6b9af4cdbf5478d14;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] scripts/kernel-doc: don't use uninitialized SRCTREE Current kernel-doc (perl) script generates this warning: Use of uninitialized value in concatenation (.) or string at scripts/kernel-doc line 1668. So explicitly check for SRCTREE in the ENV before using it, and then if it is set, append a '/' to the end of it, otherwise the SRCTREE + filename can (will) be missing the intermediate '/'. Signed-off-by: Randy Dunlap Signed-off-by: Sam Ravnborg --- diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 0835dc2a8aa9..8aaf74e64183 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1665,11 +1665,17 @@ sub xml_escape($) { } sub process_file($) { - my ($file) = "$ENV{'SRCTREE'}@_"; + my $file; my $identifier; my $func; my $initial_section_counter = $section_counter; + if (defined($ENV{'SRCTREE'})) { + $file = "$ENV{'SRCTREE'}" . "/" . "@_"; + } + else { + $file = "@_"; + } if (defined($source_map{$file})) { $file = $source_map{$file}; }