From: Michael Stapelberg Date: Sat, 17 Dec 2011 11:20:16 +0000 (+0000) Subject: complete-run: fix uninitialized warning X-Git-Tag: 4.2~188 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=95508c34693426a8ee9646806314c7d610246b50;p=i3%2Fi3 complete-run: fix uninitialized warning --- diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index fe652623..3b2bfc4f 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -172,7 +172,8 @@ my @slowest = map { $_->[0] } grep { !/^GLOBAL$/ } keys %timings; say ''; say 'The slowest tests are:'; -printf("\t%s with %.2f seconds\n", $_, $timings{$_}) for @slowest[0..4]; +printf("\t%s with %.2f seconds\n", $_, $timings{$_}) + for @slowest[0..($#slowest > 4 ? 4 : $#slowest)]; END { cleanup() }