tree 7edbe30174376b214e8583b3a0b24cb1c26f625c
parent 66da665ca36b07728acf35881f918a89a2c9fbb2
author Randy Dunlap <[EMAIL PROTECTED]> Fri, 08 Jul 2005 05:39:26 -0700
committer Sam Ravnborg <[EMAIL PROTECTED](none)> Wed, 13 Jul 2005 23:18:36 +0000

[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 <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>

 scripts/kernel-doc |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1665,11 +1665,17 @@ sub xml_escape($) {
 }
 
 sub process_file($) {
-    my ($file) = "$ENV{'SRCTREE'[EMAIL PROTECTED]";
+    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};
     }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to