r15650: Fix perl warning when generating IDL for elements with no properties
authorJelmer Vernooij <jelmer@samba.org>
Tue, 16 May 2006 22:21:44 +0000 (22:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:08:03 +0000 (14:08 -0500)
(This used to be commit 038bbbcda50d8284c56dbdc3a70214ba6202595e)

source4/pidl/lib/Parse/Pidl/Dump.pm

index 3a1cec1b59f13492e2871b1beda79769488d2d06..88f18de32253f6ca82c2e4a173efb549ecfac1a7 100644 (file)
@@ -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 .= "}";