From: Douglas Bagnall Date: Sat, 30 Nov 2019 10:05:56 +0000 (+1300) Subject: pidl s4::NDR::Parser: silence a warning X-Git-Tag: ldb-2.1.0~335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de002a0f77dba8345ca6c395a855a5c053a8dd4;p=thirdparty%2Fsamba.git pidl s4::NDR::Parser: silence a warning At level 0 there is no previous level so $pl is undefined thus so is ->{TYPE} Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 0ea7a683d95..94428ec2037 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -980,7 +980,7 @@ sub ParseDataPull($$$$$$$) my $pl = GetPrevLevel($e, $l); my $range = has_property($e, "range"); - if ($range and $pl->{TYPE} ne "ARRAY") { + if ($range and (not $pl or $pl->{TYPE} ne "ARRAY")) { $var_name = get_value_of($var_name); my $signed = Parse::Pidl::Typelist::is_signed($l->{DATA_TYPE}); my ($low, $high) = parse_range($range);