summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-05-17 12:34:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:53:49 -0500
commitc650534613e1becb1a28c6d7d2a82cc7c2225d5c (patch)
tree8729d02274b81baf617378719c872988ca857739 /source4/build
parentc2fcb0737d579eb54c50c1a496dbf6fc5491ea7c (diff)
downloadsamba-c650534613e1becb1a28c6d7d2a82cc7c2225d5c.tar.gz
samba-c650534613e1becb1a28c6d7d2a82cc7c2225d5c.tar.bz2
samba-c650534613e1becb1a28c6d7d2a82cc7c2225d5c.zip
r759: Fix some perl warnings.
(This used to be commit 1517ef3a986ec213d33b624fbbe8071600cc5b61)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/eparser.pm25
1 files changed, 15 insertions, 10 deletions
diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm
index 6c6596bf07..d3caef6b3c 100644
--- a/source4/build/pidl/eparser.pm
+++ b/source4/build/pidl/eparser.pm
@@ -490,14 +490,17 @@ sub Parse($)
my($uuid_version) = "";
my(@fns) = ();
- foreach my $d (@$idl) {
+ my($d, $e);
+
+ foreach $d (@$idl) {
# Get data from interface definition
$module = $d->{NAME}, if $d->{TYPE} eq "INTERFACE";
if ($d->{TYPE} eq "MODULEHEADER") {
- $uuid = $d->{PROPERTIES}->{uuid};
+ $uuid = $d->{PROPERTIES}->{uuid},
+ if defined($d->{PROPERTIES}->{uuid});
$uuid_version = $d->{PROPERTIES}->{version};
}
@@ -515,7 +518,7 @@ sub Parse($)
# Register function fields (parameter names)
- foreach my $e (@{$d->{DATA}}) {
+ foreach $e (@{$d->{DATA}}) {
AddField($e->{NAME}, $e->{TYPE});
}
}
@@ -529,7 +532,7 @@ sub Parse($)
# Register typedef fields (element names)
if ($d->{DATA}->{TYPE} eq "STRUCT") {
- foreach my $e (@{$d->{DATA}->{ELEMENTS}}) {
+ foreach $e (@{$d->{DATA}->{ELEMENTS}}) {
AddField($e->{NAME}, $e->{TYPE});
}
}
@@ -546,10 +549,10 @@ sub Parse($)
$res .= EtherealFieldDefinitions();
$res .= EtherealSubtreeDefinitions($module);
- foreach my $d (@$idl) {
+ foreach $d (@$idl) {
if ($d->{TYPE} eq "INTERFACE") {
- foreach my $d (@{$d->{DATA}}) {
+ foreach $d (@{$d->{DATA}}) {
# Generate function code fragments
@@ -565,10 +568,12 @@ sub Parse($)
$res .= EtherealSubdissectorRegistration($module, \@fns);
- $res .= EtherealUuidRegistration($module, $uuid, $uuid_version);
- $res .= EtherealModuleRegistration($module,
- EtherealFieldInitialisation($module),
- EtherealSubtreeInitialisation());
+ if ($uuid ne "") {
+ $res .= EtherealUuidRegistration($module, $uuid, $uuid_version);
+ $res .= EtherealModuleRegistration
+ ($module, EtherealFieldInitialisation($module),
+ EtherealSubtreeInitialisation());
+ }
return $res;
}