Prefix unused variables with an underscore.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/Patches.pm | 23 +++++++-------------- testbot/lib/WineTestBot/PendingPatchSets.pm | 4 ++-- 2 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm index ca8d57f90f..46b17e52a1 100644 --- a/testbot/lib/WineTestBot/Patches.pm +++ b/testbot/lib/WineTestBot/Patches.pm @@ -212,7 +212,7 @@ sub Submit($$$) $BuildStep->DebugLevel(0);
# Save the build step so the others can reference it. - my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save(); + my ($_ErrKey, $_ErrProperty, $ErrMessage) = $Jobs->Save(); if (defined($ErrMessage)) { $self->Disposition("Failed to submit build step"); @@ -308,7 +308,7 @@ sub Submit($$$) }
# Save it all - my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save(); + my ($_ErrKey, $_ErrProperty, $ErrMessage) = $Jobs->Save(); if (defined $ErrMessage) { $self->Disposition("Failed to submit job"); @@ -325,7 +325,7 @@ sub Submit($$$) # Switch Status to staging to indicate we are done setting up the job $NewJob->Status("staging"); $NewJob->Priority($Priority); - ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save(); + ($_ErrKey, $_ErrProperty, $ErrMessage) = $Jobs->Save(); if (defined $ErrMessage) { $self->Disposition("Failed to submit job (staging)"); @@ -470,9 +470,7 @@ sub NewPatch($$$) if ($Subject =~ m/\d+/\d+/) { $Patch->Disposition("Checking series"); - my $ErrKey; - my $ErrProperty; - ($ErrKey, $ErrProperty, $ErrMessage) = $self->Save(); + (my $_ErrKey, my $_ErrProperty, $ErrMessage) = $self->Save(); link($PatchBodies[0]->path, "$DataDir/patches/" . $Patch->Id); if (! defined($ErrMessage)) { @@ -482,9 +480,7 @@ sub NewPatch($$$) else { $Patch->Disposition("Checking patch"); - my $ErrKey; - my $ErrProperty; - ($ErrKey, $ErrProperty, $ErrMessage) = $self->Save(); + (my $_ErrKey, my $_ErrProperty, $ErrMessage) = $self->Save(); link($PatchBodies[0]->path, "$DataDir/patches/" . $Patch->Id); if (! defined($ErrMessage)) { @@ -505,14 +501,11 @@ sub NewPatch($$$) { $PatchBody->purge(); } - + if (! defined($ErrMessage)) { - my ($ErrKey, $ErrProperty, $ErrMessage) = $self->Save(); - if (defined($ErrMessage)) - { - return $ErrMessage; - } + (my $_ErrKey, my $_ErrProperty, $ErrMessage) = $self->Save(); + return $ErrMessage if (defined $ErrMessage); }
return undef; diff --git a/testbot/lib/WineTestBot/PendingPatchSets.pm b/testbot/lib/WineTestBot/PendingPatchSets.pm index 5be39e4016..53395130e7 100644 --- a/testbot/lib/WineTestBot/PendingPatchSets.pm +++ b/testbot/lib/WineTestBot/PendingPatchSets.pm @@ -258,7 +258,7 @@ sub NewSubmission($$)
$Part->Patch($Patch);
- my ($ErrKey, $ErrProperty, $ErrMessage) = $self->Save(); + my ($_ErrKey, $_ErrProperty, $ErrMessage) = $self->Save(); if (defined($ErrMessage)) { $Patch->Disposition("Error occurred during series processing"); @@ -280,7 +280,7 @@ sub NewSubmission($$) $ErrMessage = $Set->SubmitSubset($PartNo, $Part->Patch); if (!defined $ErrMessage) { - (my $ErrProperty, $ErrMessage) = $Part->Patch->Save(); + ($_ErrProperty, $ErrMessage) = $Part->Patch->Save(); } } else