svn commit: samba r15650 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl: .

jelmer at samba.org jelmer at samba.org
Tue May 16 22:21:45 GMT 2006


Author: jelmer
Date: 2006-05-16 22:21:44 +0000 (Tue, 16 May 2006)
New Revision: 15650

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15650

Log:
Fix perl warning when generating IDL for elements with no properties

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Dump.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Dump.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Dump.pm	2006-05-16 22:03:05 UTC (rev 15649)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Dump.pm	2006-05-16 22:21:44 UTC (rev 15650)
@@ -36,7 +36,7 @@
 sub DumpProperties($)
 {
     my($props) = shift;
-    my($res);
+    my $res = "";
 
     foreach my $d ($props) {
 	foreach my $k (keys %{$d}) {
@@ -63,7 +63,7 @@
 sub DumpElement($)
 {
     my($element) = shift;
-    my($res);
+    my $res = "";
 
     (defined $element->{PROPERTIES}) && 
 	($res .= DumpProperties($element->{PROPERTIES}));
@@ -89,10 +89,9 @@
 
     $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 .= "}";
     



More information about the samba-cvs mailing list