Skip to content

Commit

Permalink
[PATCH] scripts/kernel-doc: don't use uninitialized SRCTREE
Browse files Browse the repository at this point in the history
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 <rdunlap@xenotime.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Randy Dunlap authored and Sam Ravnborg committed Jul 13, 2005
1 parent 66da665 commit 2283a11
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}
Expand Down

0 comments on commit 2283a11

Please sign in to comment.