From 750985482453643e70ef8285081c6fe4969aa928 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 27 Jul 2025 23:36:33 +0200 Subject: [PATCH] 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 --- .github/scripts/badwords.pl | 2 +- .github/scripts/randcurl.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.47.3