From: Vincent Pit Date: Mon, 24 Aug 2009 22:18:31 +0000 (+0200) Subject: Remove an unused variable X-Git-Tag: v1.10~28 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=92653294359c822a0f3720d6cc7a491978168c7c;p=perl%2Fmodules%2FTest-Valgrind.git Remove an unused variable --- diff --git a/lib/Test/Valgrind/Session.pm b/lib/Test/Valgrind/Session.pm index f47e475..705e088 100644 --- a/lib/Test/Valgrind/Session.pm +++ b/lib/Test/Valgrind/Session.pm @@ -210,25 +210,22 @@ sub _run { my @supp_args; if ($self->do_suppressions) { push @supp_args, '--gen-suppressions=all'; - } else { - my @supps; - if (not $self->no_def_supp) { - my $def_supp = $self->def_supp_file; - if (defined $def_supp and not -e $def_supp) { - $self->report(Test::Valgrind::Report->new_diag( - "Generating suppressions..." - )); - require Test::Valgrind::Suppressions; - Test::Valgrind::Suppressions->generate( - tool => $self->tool, - command => $self->command, - target => $def_supp, - ); - $self->_croak('Couldn\'t generate suppressions') unless -e $def_supp; - $self->report(Test::Valgrind::Report->new_diag( - "Suppressions for this perl stored in $def_supp" - )); - } + } elsif (not $self->no_def_supp) { + my $def_supp = $self->def_supp_file; + if (defined $def_supp and not -e $def_supp) { + $self->report(Test::Valgrind::Report->new_diag( + "Generating suppressions..." + )); + require Test::Valgrind::Suppressions; + Test::Valgrind::Suppressions->generate( + tool => $self->tool, + command => $self->command, + target => $def_supp, + ); + $self->_croak('Couldn\'t generate suppressions') unless -e $def_supp; + $self->report(Test::Valgrind::Report->new_diag( + "Suppressions for this perl stored in $def_supp" + )); } push @supp_args, '--suppressions=' . $_ for $self->suppressions; }