[gtk-doc] mkdb: fixed uninitialized variable access
- From: Stefan Kost <stefkost src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: fixed uninitialized variable access
- Date: Tue, 5 Jan 2010 15:09:24 +0000 (UTC)
commit 9f036ba59450c2bb0a0d6d5471291cdd6c395373
Author: Stefan Kost <ensonic users sf net>
Date: Tue Jan 5 15:28:08 2010 +0200
mkdb: fixed uninitialized variable access
gtkdoc-mkdb.in | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 416f6e7..32ad234 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -1334,12 +1334,13 @@ sub OutputMacro {
$desc .= "<programlisting>$decl_out</programlisting>\n";
} else {
$desc .= "<programlisting>" . &MakeReturnField("#define") . "$symbol";
- # Align each line so that if should all line up OK.
- my $pad = ' ' x ($RETURN_TYPE_FIELD_WIDTH - length ("#define "));
- $declaration =~ m/^\s*#\s*define\s+\w+(\([^\)]*\))/;
- my $args = $1;
- $args =~ s/\n/\n$pad/gm;
- $desc .= &CreateValidSGML ($args);
+ if ($declaration =~ m/^\s*#\s*define\s+\w+(\([^\)]*\))/) {
+ my $args = $1;
+ my $pad = ' ' x ($RETURN_TYPE_FIELD_WIDTH - length ("#define "));
+ # Align each line so that if should all line up OK.
+ $args =~ s/\n/\n$pad/gm;
+ $desc .= &CreateValidSGML ($args);
+ }
$desc .= "</programlisting>\n";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]