From 392e4b383c35ba9befd396a99f6f27608efb9862 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 May 2006 22:21:44 +0000 Subject: r15650: Fix perl warning when generating IDL for elements with no properties (This used to be commit 038bbbcda50d8284c56dbdc3a70214ba6202595e) --- source4/pidl/lib/Parse/Pidl/Dump.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source4') diff --git a/source4/pidl/lib/Parse/Pidl/Dump.pm b/source4/pidl/lib/Parse/Pidl/Dump.pm index 3a1cec1b59..88f18de322 100644 --- a/source4/pidl/lib/Parse/Pidl/Dump.pm +++ b/source4/pidl/lib/Parse/Pidl/Dump.pm @@ -36,7 +36,7 @@ my($res); sub DumpProperties($) { my($props) = shift; - my($res); + my $res = ""; foreach my $d ($props) { foreach my $k (keys %{$d}) { @@ -63,7 +63,7 @@ sub DumpProperties($) sub DumpElement($) { my($element) = shift; - my($res); + my $res = ""; (defined $element->{PROPERTIES}) && ($res .= DumpProperties($element->{PROPERTIES})); @@ -89,10 +89,9 @@ sub DumpStruct($) $res .= "struct {\n"; if (defined $struct->{ELEMENTS}) { - foreach my $e (@{$struct->{ELEMENTS}}) { - $res .= "\t" . DumpElement($e); - $res .= ";\n"; - } + foreach (@{$struct->{ELEMENTS}}) { + $res .= "\t" . DumpElement($_) . ";\n"; + } } $res .= "}"; -- cgit