From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH 11/12] rules.pl: Add workaround to hide a warning about an only once used variable. Date: Tue, 15 Feb 2022 12:37:14 +0000 Message-ID: <20C1D9AA-4DDE-4CDB-8D1A-A396214957DA@ipfire.org> In-Reply-To: <20220214184257.2406-11-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0783739739657068838==" List-Id: --===============0783739739657068838== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Is it not possible to disable this kind of warning entirely? It is a stupid idea. Does declaring the variable as some sort of constant help? -Michael > On 14 Feb 2022, at 18:42, Stefan Schantl wrot= e: >=20 > Signed-off-by: Stefan Schantl > --- > config/firewall/rules.pl | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl > index 162781f7a..c0878059a 100644 > --- a/config/firewall/rules.pl > +++ b/config/firewall/rules.pl > @@ -109,6 +109,10 @@ my $POLICY_INPUT_ACTION =3D $fwoptions{"FWPOLICY2"}; > my $POLICY_FORWARD_ACTION =3D $fwoptions{"FWPOLICY"}; > my $POLICY_OUTPUT_ACTION =3D $fwoptions{"FWPOLICY1"}; >=20 > +#workaround to suppress a warning when a variable is used only once > +my @dummy =3D ( $Location::Functions::ipset_db_directory ); > +undef (@dummy); > + > # MAIN > &main(); >=20 > --=20 > 2.30.2 >=20 --===============0783739739657068838==--