kernel-doc/rst: fix use of uninitialized value
authorJani Nikula <jani.nikula@intel.com>
Thu, 19 May 2016 17:32:48 +0000 (20:32 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 30 May 2016 10:38:50 +0000 (13:38 +0300)
I'm not quite sure why the errors below are happening, but this fixes
them.

Use of uninitialized value in string ne at ./scripts/kernel-doc line 1819, <IN> line 6494.
Use of uninitialized value $_[0] in join or string at ./scripts/kernel-doc line 1759, <IN> line 6494.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
scripts/kernel-doc

index 2fc8fad5195e8994a320013cd8c731a0d9469f63..babb374c043dd98f31424f519b28046dfb1d0f34 100755 (executable)
@@ -1803,7 +1803,8 @@ sub output_function_rst(%) {
        } else {
            print "      ``$parameter``\n";
        }
-       if ($args{'parameterdescs'}{$parameter_name} ne $undescribed) {
+       if (defined($args{'parameterdescs'}{$parameter_name}) &&
+           $args{'parameterdescs'}{$parameter_name} ne $undescribed) {
            my $oldprefix = $lineprefix;
            $lineprefix = "        ";
            output_highlight_rst($args{'parameterdescs'}{$parameter_name});