]> git.donarmstrong.com Git - debbugs.git/commitdiff
Drop more unused variables
authorNiels Thykier <niels@thykier.net>
Fri, 5 Aug 2016 20:12:42 +0000 (20:12 +0000)
committerDon Armstrong <don@donarmstrong.com>
Wed, 7 Sep 2016 18:59:20 +0000 (11:59 -0700)
Signed-off-by: Niels Thykier <niels@thykier.net>
Debbugs/CGI.pm
Debbugs/CGI/Bugreport.pm
Debbugs/Control.pm
Debbugs/Control/Service.pm
Debbugs/Estraier.pm
Debbugs/Packages.pm
Debbugs/Recipients.pm
Debbugs/SOAP.pm
Debbugs/Status.pm
Debbugs/Text.pm

index 393b40602ef12203d1c746ddedcb53c0476f3fb3..9cc4d512426310e48b15f048722834ac34f7b160 100644 (file)
@@ -624,10 +624,6 @@ sub htmlize_maintlinks {
     return htmlize_addresslinks($prefixfunc, \&mainturl, $maints);
 }
 
-
-our $_maintainer;
-our $_maintainer_rev;
-
 =head2 bug_linklist
 
      bug_linklist($separator,$class,@bugs)
@@ -843,7 +839,6 @@ sub option_form{
      for my $key (keys %{$param{form_option}}) {
          # strip out leader; shouldn't be anything here without one,
          # but skip stupid things anyway
-         my $o_key = $key;
          next unless $key =~ s/^\Q$form_option_leader\E//;
          if ($key =~ /^add_(.+)$/) {
               # this causes a specific parameter to be added
index 9ca67ed4ac6dbf243f749ac931d7799d92c8228a..888a1b37b11fd16bb27139b991d86c7eea8cee2f 100644 (file)
@@ -126,7 +126,6 @@ sub display_entity {
     my $output = globify_scalar($param{output});
     my $entity = $param{entity};
     my $ref = $param{bug_num};
-    my $top = $param{outer};
     my $xmessage = $param{msg_num};
     my $attachments = $param{attachments};
 
index 416abc150104741bff85625bb03353ab0930a3dd..6f7420679beadd8339de6574877ec0758937d55e 100644 (file)
@@ -444,7 +444,6 @@ sub set_blocks {
            }
        }
     }
-    my @new_blockers = keys %blockers;
     for my $data (@data) {
        my $old_data = dclone($data);
        # remove blockers and/or add new ones as appropriate
@@ -487,9 +486,7 @@ sub set_blocks {
     $mungable_blocks{add} = \%added_blockers if keys %added_blockers;
     my $new_locks = 0;
     for my $add_remove (keys %mungable_blocks) {
-       my @munge_blockers;
        my %munge_blockers;
-       my $block_locks = 0;
        for my $blocker (keys %{$mungable_blocks{$add_remove}}) {
            next if $munge_blockers{$blocker};
            my ($temp_locks, @blocking_data) =
@@ -628,10 +625,8 @@ sub set_tag {
        __begin_control(%param,
                        command  => 'tag'
                       );
-    my ($debug,$transcript) =
-       @info{qw(debug transcript)};
+    my $transcript = $info{transcript};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my @tags = make_list($param{tag});
     if (not @tags and ($param{remove} or $param{add})) {
        if ($param{remove}) {
@@ -649,11 +644,9 @@ sub set_tag {
        my $action = 'Did not alter tags';
        my %tag_added = ();
        my %tag_removed = ();
-       my %fixed_removed = ();
        my @old_tags = split /\,?\s+/, $data->{keywords};
        my %tags;
        @tags{@old_tags} = (1) x @old_tags;
-       my $reopened = 0;
        my $old_data = dclone($data);
        if (not $param{add} and not $param{remove}) {
            $tag_removed{$_} = 1 for @old_tags;
@@ -773,10 +766,8 @@ sub set_severity {
        __begin_control(%param,
                        command  => 'severity'
                       );
-    my ($debug,$transcript) =
-       @info{qw(debug transcript)};
+    my $transcript = $info{transcript};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
 
     my $action = '';
     for my $data (@data) {
@@ -878,10 +869,8 @@ sub set_done {
        __begin_control(%param,
                        command  => $param{reopen}?'reopen':'done',
                       );
-    my ($debug,$transcript) =
-       @info{qw(debug transcript)};
+    my $transcript = $info{transcript};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my $action ='';
 
     if ($param{reopen}) {
@@ -941,7 +930,6 @@ sub set_done {
     }
     else {
        my %submitter_notified;
-       my $requester_notified = 0;
        my $orig_report_set = 0;
        for my $data (@data) {
            if (exists $data->{done} and
@@ -1100,7 +1088,6 @@ sub set_submitter {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my $action = '';
     # here we only concern ourselves with the first of the merged bugs
     for my $data ($data[0]) {
@@ -1215,7 +1202,6 @@ sub set_forwarded {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my $action = '';
     for my $data (@data) {
        my $old_data = dclone($data);
@@ -1304,7 +1290,6 @@ sub set_title {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my $action = '';
     for my $data (@data) {
        my $old_data = dclone($data);
@@ -1399,7 +1384,6 @@ sub set_package {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     # clean up the new package
     my $new_package =
        join(',',
@@ -1523,7 +1507,6 @@ sub set_found {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my %versions;
     for my $version (make_list($param{found})) {
        next unless defined $version;
@@ -1743,7 +1726,6 @@ sub set_fixed {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my %versions;
     for my $version (make_list($param{fixed})) {
        next unless defined $version;
@@ -1970,7 +1952,6 @@ sub set_merged {
        return;
     }
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my %data;
     my %merged_bugs;
     for my $data (@data) {
@@ -1981,7 +1962,6 @@ sub set_merged {
     # handle unmerging
     my $new_locks = 0;
     if (not exists $param{merge_with}) {
-       my $ok_to_unmerge = 1;
        delete $merged_bugs{$param{bug}};
        if (not keys %merged_bugs) {
            print {$transcript} "Ignoring request to unmerge a bug which is not merged with any others.\n";
@@ -2015,9 +1995,6 @@ sub set_merged {
        return;
     }
     # lock and load all of the bugs we need
-    my @bugs_to_load = keys %merging;
-    my $bug_to_load;
-    my %merge_added;
     my ($data,$n_locks) =
        __lock_and_load_merged_bugs(bugs_to_load => [keys %merging],
                                    data => \@data,
@@ -2109,7 +2086,6 @@ sub set_merged {
                    my %target_blockedby;
                    @target_blockedby{@{$change->{func_value}}} = (1) x @{$change->{func_value}};
                    my %unhandled_targets = %target_blockedby;
-                   my @blocks_to_remove;
                    for my $key (split / /,$change->{orig_value}) {
                        delete $unhandled_targets{$key};
                        next if exists $target_blockedby{$key};
@@ -2560,7 +2536,6 @@ sub affects {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     my $action = '';
     for my $data (@data) {
        $action = '';
@@ -2738,7 +2713,6 @@ sub _summary {
     my ($debug,$transcript) =
        @info{qw(debug transcript)};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
     # figure out the log that we're going to use
     my $summary = '';
     my $summary_msg = '';
@@ -2894,10 +2868,8 @@ sub clone_bug {
        __begin_control(%param,
                        command  => 'clone'
                       );
-    my ($debug,$transcript) =
-       @info{qw(debug transcript)};
+    my $transcript = $info{transcript};
     my @data = @{$info{data}};
-    my @bugs = @{$info{bugs}};
 
     my $action = '';
     for my $data (@data) {
@@ -3029,7 +3001,6 @@ sub owner {
      my ($debug,$transcript) =
        @info{qw(debug transcript)};
      my @data = @{$info{data}};
-     my @bugs = @{$info{bugs}};
      my $action = '';
      for my $data (@data) {
          print {$debug} "Going to change owner to '".(defined $param{owner}?$param{owner}:'(going to unset it)')."'\n";
@@ -3242,7 +3213,6 @@ sub bug_unarchive {
                                command=>'unarchive');
      my ($debug,$transcript) =
         @info{qw(debug transcript)};
-     my @data = @{$info{data}};
      my @bugs = @{$info{bugs}};
      my $action = "$config{bug} unarchived.";
      my @files_to_remove;
index 42f3801e90758151e2e6ad88840c967e36be0ece..32e1f9730fadd18c76c025d4f9a321323950efda 100644 (file)
@@ -561,9 +561,7 @@ sub control_line {
            print {$transcript} "Failed to forcibly merge $ref: ".cleanup_eval_fail($@,$debug)."\n";
        }
     } elsif ($ctl eq 'clone') {
-       my $origref = $matches[0];
        my @newclonedids = split /\s+/, $matches[1];
-       my $newbugsneeded = scalar(@newclonedids);
 
        eval {
            my %new_clones;
index 7ada02d77302b1cf8875e9675aba8a6d4ded7fd7..174ad4c6493306dd2e5f2b5acb11157ec27cf9f8 100644 (file)
@@ -95,7 +95,6 @@ sub remove_old_messages{
      my $cond = new Search::Estraier::Condition;
      $cond->add_attr('@uri STRBW '.$bug_num.'/');
      $cond->set_max(50);
-     my $skip;
      my $nres;
      while ($nres = $est->search($cond,0) and $nres->doc_num > 0){
          for my $rdoc (map {$nres->get_doc($_)} 0..($nres->doc_num-1)) {
index f2ba789b14d1c0ccd149dddcf7172a49b351969a..c7fd47c18b6f5dde189a563fe8e61ad2e8955a6e 100644 (file)
@@ -234,7 +234,6 @@ sub binary_to_source{
            }
        }
        else {
-           my $found_one_version = 0;
            for my $version (@versions) {
                next unless exists $bin->{$version};
                if (exists $bin->{$version}{all}) {
@@ -530,7 +529,6 @@ sub makesourceversions {
                           arch    => 'source',
                           versions => '0.1.1',
                           guess_source => 1,
-                          debug    => \$debug,
                           warnings => \$warnings,
                          );
 
@@ -573,7 +571,6 @@ sub make_source_versions {
                                        },
                             );
     my ($warnings) = globify_scalar(exists $param{warnings}?$param{warnings}:undef);
-    my ($debug)    = globify_scalar(exists $param{debug}   ?$param{debug}   :undef);
 
     my @packages = grep {defined $_ and length $_ } make_list($param{package});
     my @archs    = grep {defined $_ } make_list ($param{arch});
index f9b2c7329c2c9ab91c65a3a5953dbc6d32c30094..fe99f2515f8f9eda415526a224c134cfe6660e1a 100644 (file)
@@ -111,8 +111,7 @@ sub add_recipients {
          }
          return;
      }
-     my ($p, $addmaint);
-     my $anymaintfound=0; my $anymaintnotfound=0;
+     my ($addmaint);
      my $ref = $param{data}{bug_num};
      for my $p (splitpackages($param{data}{package})) {
          $p = lc($p);
index 7508e9414da28e2a260783dc2e2cb6a0baebc154..9ed0249b863731504e1975eb105edd90a34abfe3 100644 (file)
@@ -233,7 +233,6 @@ sub get_bug_log{
 
      my %seen_msg_ids;
      my $current_msg=0;
-     my $status = {};
      my @messages;
      while (my $record = $log->read_record()) {
          $current_msg++;
index 72e9ae65a05dd37c9877dbed32a2233ef5bc0153..dabf8112229f195c007c78e662b999ae9cc6e42b 100644 (file)
@@ -416,7 +416,6 @@ data.
 =cut
 
 sub lockreadbugmerge {
-     my ($bug_num,$location) = @_;
      my $data = lockreadbug(@_);
      if (not defined $data) {
          return (0,undef);
index 21bde013adbdf4035a3b8d79b712d8be763b6129..3c34b97c4150eff6eb0708f8c01a1257f0beb642 100644 (file)
@@ -64,7 +64,6 @@ use Data::Dumper;
 our %tt_templates;
 our %filled_templates;
 our $safe;
-our $hole = Safe::Hole->new({});
 our $language;
 
 # This function is what is called when someone does include('foo/bar')