From: John Thacker Date: Wed, 3 Jul 2024 12:00:59 +0000 (-0400) Subject: pidl: Wireshark: Don't assign hash undef, assign it an empty array X-Git-Tag: tdb-1.4.11~153 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9870457e962b2ce2da590777aa4f58269361b95b;p=thirdparty%2Fsamba.git pidl: Wireshark: Don't assign hash undef, assign it an empty array Pick up change from Wireshark: commit ade6577f109e2bf741909226254b758e79a816f1 Author: John Thacker Date: Fri Jun 21 20:27:51 2024 -0400 pidl: Don't assign hash undef, assign it an empty array Perl works, but complains if warnings are on, if a hash is initialized to undef instead of to empty. Upstream Samba turned on warnings in the next commit to catch things like this. Signed-off-by: John Thacker Reviewed-by: Jo Sutton Reviewed-by: Stefan Metzmacher --- diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index fef98db8abd..ee28e8a7c36 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -584,7 +584,7 @@ sub Function($$$) my %dissectornames; foreach (@{$fn->{ELEMENTS}}) { - $dissectornames{$_->{NAME}} = $self->Element($_, $fn->{NAME}, $ifname, undef, undef) if not defined($dissectornames{$_->{NAME}}); + $dissectornames{$_->{NAME}} = $self->Element($_, $fn->{NAME}, $ifname, undef, ()) if not defined($dissectornames{$_->{NAME}}); } my $fn_name = $_->{NAME}; @@ -814,7 +814,7 @@ sub Union($$$$) foreach (@{$e->{ELEMENTS}}) { $res.="\n\t\t$_->{CASE}:\n"; if ($_->{TYPE} ne "EMPTY") { - $res.="\t\t\t".$self->Element($_, $name, $ifname, undef, undef)."\n"; + $res.="\t\t\t".$self->Element($_, $name, $ifname, undef, ())."\n"; } $res.="\t\tbreak;\n"; }