From: John Thacker Date: Sun, 12 Oct 2025 18:56:40 +0000 (-0400) Subject: wireshark-pidl: Reduce Perl strict warnings X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1573dd8b51e1858feaaf5e2479a63bb6f4743855;p=thirdparty%2Fsamba.git wireshark-pidl: Reduce Perl strict warnings From the Wireshark git development branch: commit 8dee8601776175a6132bef7ab19f36ee3d589d06 Author: John Thacker Date: Wed Oct 8 17:15:56 2025 -0400 pidl: Use has_property to avoid comparing undef with the empty string Prevents a bunch of (harmless) warnings when compiling: Use of uninitialized value in string eq at /builds/wireshark/wireshark/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm line 521. Signed-off-by: John Thacker Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 78320e8d093..5f374dd9146 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -493,7 +493,7 @@ sub Element($$$$$$) } else { $moreparam = ""; } - if (($e->{PROPERTIES}->{switch_is} eq "") && ($switchvars{$name}) && + if ((not has_property($e, "switch_is")) && ($switchvars{$name}) && #not a "native" type (!($type =~ /^uint(8|16|1632|32|3264|64)/))) { $param = $name;