From: Viktor Szakats Date: Sun, 27 Jul 2025 21:36:33 +0000 (+0200) Subject: scripts: fix two Perl uninitialized value warnings X-Git-Tag: curl-8_16_0~373 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=750985482453643e70ef8285081c6fe4969aa928;p=thirdparty%2Fcurl.git scripts: fix two Perl uninitialized value warnings ``` Use of uninitialized value $errors in exit at .github/scripts/badwords.pl line 87. Use of uninitialized value $o in concatenation (.) or string at ../.github/scripts/randcurl.pl line 99. ``` Follow-up to 2ec54556d4e3f3ab551b5298adab0c703d85a463 #17877 Cherry-picked from #18042 Closes #18047 --- diff --git a/.github/scripts/badwords.pl b/.github/scripts/badwords.pl index e51d99f0d1..bd66f33166 100755 --- a/.github/scripts/badwords.pl +++ b/.github/scripts/badwords.pl @@ -40,7 +40,7 @@ while() { } } -my $errors; +my $errors = 0; sub file { my ($f) = @_; diff --git a/.github/scripts/randcurl.pl b/.github/scripts/randcurl.pl index c07ba9b7de..b085d2ef13 100755 --- a/.github/scripts/randcurl.pl +++ b/.github/scripts/randcurl.pl @@ -92,7 +92,7 @@ sub randarg { "0123456789". ",-?#$%!@ "; my $len = getnum(20); - my $o; + my $o = ''; for (1 .. $len) { $o .= substr($nice, getnum(length($nice)), 1); }