summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-11-21 23:21:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:21 -0500
commitce0c2236b953dc977655dbceef40916825e843ae (patch)
treec279a2f20a2831386a9d5ec6daa29a71fc1843cc /source4/pidl
parentde2ab46ad87be31df21d922e15c119cd681dc110 (diff)
downloadsamba-ce0c2236b953dc977655dbceef40916825e843ae.tar.gz
samba-ce0c2236b953dc977655dbceef40916825e843ae.tar.bz2
samba-ce0c2236b953dc977655dbceef40916825e843ae.zip
r19830: Warn about non-ref top-level pointers.
(This used to be commit 78153200ac45ce7333c91c48ded549b5eed5e077)
Diffstat (limited to 'source4/pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm
index a80bb954c1..d017c455a6 100644
--- a/source4/pidl/lib/Parse/Pidl/NDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/NDR.pm
@@ -70,8 +70,6 @@ my $scalar_alignment = {
'ipv4address' => 4
};
-
-
sub nonfatal($$)
{
my ($e,$s) = @_;
@@ -135,8 +133,7 @@ sub GetElementLevelTable($)
$is_string = 1;
delete($e->{PROPERTIES}->{string});
} else {
- print "$e->{FILE}:$e->{LINE}: Must specify size_is() for conformant array!\n";
- exit 1;
+ fatal($e, "Must specify size_is() for conformant array!")
}
if (($length = shift @length_is) or $is_string) {
@@ -184,6 +181,10 @@ sub GetElementLevelTable($)
LEVEL => $level
});
+ nonfatal($e, "top-level pointer `$e->{NAME}' is not a \[ref\] pointer")
+ if ($i == 1 and pointer_type($e) ne "ref" and
+ $e->{PARENT}->{TYPE} eq "FUNCTION");
+
$pointer_idx++;
# everything that follows will be deferred