提交 2283a117 编写于 作者: R Randy Dunlap 提交者: Sam Ravnborg

[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: NRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
上级 66da665c
......@@ -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};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册